Age | Commit message (Collapse) | Author |
|
Parse macro expressions.
Clang is trolling me really hard so I'm going to see if the extra token I'm always getting is LLVM 3.9 specific.
|
|
|
|
|
|
|
|
default BitOr implementation.
|
|
|
|
|
|
Signed-off-by: Emilio Cobos Álvarez <ecoal95@gmail.com>
|
|
Add `clang::Type::is_valid` and use it instead of checking self.kind() against CXType_Invalid
Needed `is_valid()` when debugging, so figured we should land this and update places where we compare against the magical sentinel value.
r? @emilio
|
|
Add an option to avoid converting to f32/f64 automatically float types.
This implements another feature that we need for parity with upstream bindgen.
r? @fitzgen
|
|
Support --use-core and --ctypes-prefix
As requested in https://github.com/Yamakaky/rust-bindgen/issues/400#issuecomment-258632805.
r? @fitzgen
|
|
Make clang::Cursor::fallible_semantic_parent make ffi call
This PR fixes #120 . `clang::Cursor::semantic_parent` now just calls `clang::Cursor::fallible_semantic_parent`, and the ffi call has been moved into `fallible_semantic_parent`.
This change broke a number of tests which call `is_toplevel()` (which itself calls `semantic_parent()`):
> panicked at called Option::unwrap() on a None value
So I re-wrote `is_toplevel()` to call `fallible_semantic_parent()`, which returns an `Option<Cursor>` type instead.
|
|
CXType_Invalid
|
|
|
|
A helper for checking if the type's kind is not `CXType_Invalid`.
|
|
|
|
|
|
|
|
|
|
Also reorganize calling function to avoid duplicate checking of cursor
type.
Fixes #127
|
|
|
|
|
|
|
|
|
|
|
|
change return value of Type::pointee_type() to Option<Type>
Fixes #137
|
|
|
|
|
|
|
|
r=emilio
Dangling item id in partial specializations
See individual commit messages for details.
r? @emilio
|
|
The `with_id` id will potentially end up unused if we find we already
have an item (with its own distinct `ItemId`) for the type, so if we
pass `with_id` as the parent id when parsing children it is potentially
a dangling reference. Instead, use the canonical template declaration as
the parent. It is already parsed and has a known-resolvable `ItemId`.
|
|
This adds a temporary binding for the newly allocated id so that we can
use it in conditional breakpoints when debugging dangling `ItemId`
references. I believe that we will want the ability to set conditional
breakpoints in this method every single time we end up debugging
dangling references, so it is worth landing in master.
|
|
Paired with @glasserc
|
|
Make clang::Cursor::ret_type return an Option<Type> — Fixes #131
Well apparently nobody is using `Cursor::ret_type` 😢
|
|
|
|
|
|
|
|
Allow aliases and template aliases to be considered for replacement
Fixes #89.
I'm not exactly *happy* with the way this is implemented (making `real_canonical_name` public so that we can use it in replacement lookups) but I'm not sure of a better way without refactoring most of how naming works right now.
r? @emilio
|
|
|
|
Add logging of Clang version
PR to address #152 for logging libclang version for debugging purposes. Let me know if it needs tweaking!
|
|
Do not overwrite existing replacements
It turns out that we can end up overwriting existing replacements. This commit embeds the assumption that the first replacement definition is the correct one, and warns on all attempts to overwrite the first replacement definition with a new one. Additionally, it adds some debug logging about replacements.
This actually isn't enough to fix the test case in #89, but it is a good start.
r? @emilio
|
|
|
|
It turns out that we can end up overwriting existing replacements. This commit
embeds the assumption that the first replacement definition is the correct one,
and warns on all attempts to overwrite the first replacement definition with a
new one. Additionally, it adds some debug logging about replacements.
|
|
Make clang::Cursor::specialized return an Option
Fixes #122.
pair=@Natim
|
|
clang: Simplify visiting code.
It has always been a mess.
r? @fitzgen
|
|
It has always been a mess.
|
|
Thanks @emilio for the suggestion.
|
|
clang: Remove stupid `match` blocks and change them for well-supported functions.
r? @fitzgen
|
|
clang: Some partially specialized templates return no template argument count.
Trying to construct a test case, meanwhile: r? @fitzgen
|
|
functions.
|