diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2018-12-14 13:43:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-14 13:43:51 +0100 |
commit | 371e744e4158f23e75adb296433fc684076964ad (patch) | |
tree | 9b3bbf2fff95cf96b170420a7346f0775806ca00 /src/ir/function.rs | |
parent | eb97c1494d5debac81b51847c3cba61496471bfb (diff) | |
parent | 9ba6d13c4320bd7d225b086957c801811458f2c7 (diff) |
Merge pull request #1467 from emilio/attr-detection-flagv0.45.0
ir: Put function attribute detection under an opt-in flag.
Diffstat (limited to 'src/ir/function.rs')
-rw-r--r-- | src/ir/function.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ir/function.rs b/src/ir/function.rs index f851ad72..acbfe707 100644 --- a/src/ir/function.rs +++ b/src/ir/function.rs @@ -394,7 +394,9 @@ impl FunctionSig { } }; - let must_use = cursor.has_simple_attr("warn_unused_result"); + let must_use = + ctx.options().enable_function_attribute_detection && + cursor.has_simple_attr("warn_unused_result"); let is_method = cursor.kind() == CXCursor_CXXMethod; let is_constructor = cursor.kind() == CXCursor_Constructor; let is_destructor = cursor.kind() == CXCursor_Destructor; |