summaryrefslogtreecommitdiff
path: root/tests/headers/attribute_warn_unused_result_no_attribute_detection.hpp
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2018-12-14 12:24:14 +0100
committerEmilio Cobos Álvarez <emilio@crisal.io>2018-12-14 12:26:31 +0100
commita4d9ffbd8530735a87b22b278dc33f32692b228e (patch)
tree8670acaeec87f5fe292a9a966eed2dee3e57bfc0 /tests/headers/attribute_warn_unused_result_no_attribute_detection.hpp
parenteb97c1494d5debac81b51847c3cba61496471bfb (diff)
ir: Put function attribute detection under an opt-in flag.
Given it was a considerable performance hit under some workloads. Closes #1465.
Diffstat (limited to 'tests/headers/attribute_warn_unused_result_no_attribute_detection.hpp')
-rw-r--r--tests/headers/attribute_warn_unused_result_no_attribute_detection.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/headers/attribute_warn_unused_result_no_attribute_detection.hpp b/tests/headers/attribute_warn_unused_result_no_attribute_detection.hpp
new file mode 100644
index 00000000..21550307
--- /dev/null
+++ b/tests/headers/attribute_warn_unused_result_no_attribute_detection.hpp
@@ -0,0 +1,10 @@
+// bindgen-flags: --rust-target 1.27
+
+class Foo {
+public:
+ __attribute__((warn_unused_result))
+ int foo(int);
+};
+
+__attribute__((warn_unused_result))
+int foo(int);