-
Notifications
You must be signed in to change notification settings - Fork 746
Some function pointers, typedefs, and OSX's stdlib. #58
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two remarks, otherwise r=me.
if !declaration.is_valid() { | ||
if let Some(location) = location { | ||
if location.kind() == CXCursor_ClassTemplate || | ||
location.kind() == CXCursor_ClassTemplatePartialSpecialization { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: maybe use a match
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I want to use the matches!
crate instead, here and in a few other places, but I'll do that in a follow-up.
|
||
|
||
extern "C" { | ||
pub fn atexit_b(arg1: ::std::option::Option<unsafe extern "C" fn()>); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should just bind blocks to *mut c_void
given their ABI is weird.
Signed-off-by: Emilio Cobos Álvarez <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgot one comment.
} | ||
} | ||
declaration = declaration.canonical(); | ||
if !declaration.is_valid() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you rebound declaration
to the canonical one, which is invalid.
What does the debug!
message end up saying, given the declaration you passed to it is the invalid one now?
@bors-servo r+ |
📌 Commit cc8ed87 has been approved by |
⚡ Test exempted - status |
Some function pointers, typedefs, and OSX's stdlib. r? @nox The change from indexing cursors to index USRs was because in the `inner_template_self` test, the `next` pointer pointed to a clang-generated class declaration that caused us to not catch the type as already resolved. Also, that's the recommended way to check against same symbols from different translation units, though now we don't use it yet.
Union support Built on top of #58, this adds support for untagged unions if not running under the `--no-unstable-rust-flag`. The last commit is an example try run passing with this, but should be reverted (and the `--no-unstable-rust` flag passed by default to our harness). This depends on serde-deprecated/aster#109. r? @nox
r? @nox
The change from indexing cursors to index USRs was because in the
inner_template_self
test, thenext
pointer pointed to a clang-generated class declaration that caused us to not catch the type as already resolved.Also, that's the recommended way to check against same symbols from different translation units, though now we don't use it yet.