-
Notifications
You must be signed in to change notification settings - Fork 707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement __attribute__((__warn_unused_result__)) #2149
Comments
Hmm, we're supposed to have some support for this, see tests/expectations/tests/attribute_warn_unused_result.rs |
We have this behind the |
Would it be ok to filter this through the ParseCallbacks to avoid calling it unnecessarily? |
MihirLuthra
added a commit
to fortanix/rust-mbedtls
that referenced
this issue
Feb 7, 2022
Although, bindgen needs .enable_function_attribute_detection() to process __attribute__((__warn_unused_result__)) because parsing attrs can be really slow in certain cases. Benches were performed to confirm our case doesn't face that issue. References: rust-lang/rust-bindgen#2149 rust-lang/rust-bindgen#1465 rust-lang/rust-bindgen#1466 rust-lang/rust-bindgen#1467
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Input C/C++ Header
__attribute__((__warn_unused_result__)) int f();
Bindgen Invocation
Actual Results
Expected Results
The text was updated successfully, but these errors were encountered: