-
Notifications
You must be signed in to change notification settings - Fork 699
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
Check if clang_Type_getNumTemplateArguments
is loaded before use
#916
Merged
bors-servo
merged 1 commit into
rust-lang:master
from
fitzgen:check-if-num-template-args-is-loaded
Aug 16, 2017
Merged
Check if clang_Type_getNumTemplateArguments
is loaded before use
#916
bors-servo
merged 1 commit into
rust-lang:master
from
fitzgen:check-if-num-template-args-is-loaded
Aug 16, 2017
Conversation
This file contains 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
emilio
approved these changes
Aug 16, 2017
src/clang.rs
Outdated
@@ -833,6 +833,10 @@ impl Type { | |||
/// Get the number of template arguments this type has, or `None` if it is | |||
/// not some kind of template. | |||
pub fn num_template_args(&self) -> Option<u32> { | |||
if !clang_Type_getNumTemplateArguments::is_loaded() { |
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.
Can you comment on this, saying that it's not correct but that that shouldn't block C bindings from working?
Older clang don't have it, and while we can't pass our whole test suite with those older clangs, we can still generate simple C bindings, so it makes sense not to panic for C++ only things.
fitzgen
force-pushed
the
check-if-num-template-args-is-loaded
branch
from
August 16, 2017 22:35
19fff3e
to
b6c7592
Compare
@bors-servo r+ Thanks for review! |
📌 Commit b6c7592 has been approved by |
bors-servo
pushed a commit
that referenced
this pull request
Aug 16, 2017
…fitzgen Check if `clang_Type_getNumTemplateArguments` is loaded before use Older clang don't have it, and while we can't pass our whole test suite with those older clangs, we can still generate simple C bindings, so it makes sense not to panic for C++ only things.
☀️ Test successful - status-travis |
Closed
kulp
added a commit
to kulp/rust-bindgen
that referenced
this pull request
Jun 22, 2020
It is not clear what version of libclang these supported. Refer to rust-lang#1321, rust-lang#1304, rust-lang#916, rust-lang#915.
kulp
added a commit
to kulp/rust-bindgen
that referenced
this pull request
Jun 24, 2020
It is not clear what version of libclang these supported. Refer to rust-lang#1321, rust-lang#1304, rust-lang#916, rust-lang#915.
kulp
added a commit
to kulp/rust-bindgen
that referenced
this pull request
Jun 28, 2020
It is not clear what version of libclang these supported. Refer to rust-lang#1321, rust-lang#1304, rust-lang#916, rust-lang#915.
kulp
added a commit
to kulp/rust-bindgen
that referenced
this pull request
Jun 29, 2020
It is not clear what version of libclang these supported. Refer to rust-lang#1321, rust-lang#1304, rust-lang#916, rust-lang#915.
kulp
added a commit
to kulp/rust-bindgen
that referenced
this pull request
Jul 17, 2020
It is not clear what version of libclang these supported. Refer to rust-lang#1321, rust-lang#1304, rust-lang#916, rust-lang#915.
kulp
added a commit
to kulp/rust-bindgen
that referenced
this pull request
Jul 20, 2020
It is not clear what version of libclang these supported. Refer to rust-lang#1321, rust-lang#1304, rust-lang#916, rust-lang#915.
emilio
pushed a commit
that referenced
this pull request
Jul 20, 2020
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.
Older clang don't have it, and while we can't pass our whole test suite with those older clangs, we can still generate simple C bindings, so it makes sense not to panic for C++ only things.