Don't traverse through special-cased <stdint.h> types.#2287
Merged
pvdrz merged 1 commit intorust-lang:masterfrom Sep 29, 2022
Merged
Don't traverse through special-cased <stdint.h> types.#2287pvdrz merged 1 commit intorust-lang:masterfrom
pvdrz merged 1 commit intorust-lang:masterfrom
Conversation
8f0f751 to
e9a266a
Compare
Contributor
|
Thanks for your PR! I tried to do a mini test about this using b5ec18e and found that: typedef unsigned long long uint64_t;
uint64_t foo();emits the following rust code: /* automatically generated by rust-bindgen 0.60.1 */
extern "C" {
pub fn foo() -> u64;
}Do you have an extra example showing how your changes affect this behavior so we can add it as a test? |
e9a266a to
70115a0
Compare
Contributor
Author
|
I added a test that demonstrates the issue. The key is to have a two-layer typedef: |
Contributor
|
Looks good to me! Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1663.
Not sure if this is too special-casey, but there's already a bunch of this stuff strewn about. Seems like it would be cleanest to add a new
TypeKindfor stdint types populated infrom_clang_tybut that seemed like a ton of work for relatively little gain.