summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-11-08Moar tests.Emilio Cobos Álvarez
2016-11-08`cargo fmt`.Emilio Cobos Álvarez
2016-11-08Add an option to generate bitfield-like typesafe enums.Emilio Cobos Álvarez
2016-11-08Auto merge of #229 - emilio:core-functions, r=fitzgenbors-servo
Fix --use-core for functions, since we used the aster helper. r? @fitzgen, @nox or anyone else?
2016-11-08Fix --use-core for functions, since we used the aster helper.Emilio Cobos Álvarez
Signed-off-by: Emilio Cobos Álvarez <ecoal95@gmail.com>
2016-11-07Auto merge of #224 - fitzgen:type-is-valid, r=emiliobors-servo
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
2016-11-07Auto merge of #221 - emilio:dont-override-float, r=fitzgenbors-servo
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
2016-11-07Auto merge of #218 - emilio:use-core, r=fitzgenbors-servo
Support --use-core and --ctypes-prefix As requested in https://github.com/Yamakaky/rust-bindgen/issues/400#issuecomment-258632805. r? @fitzgen
2016-11-07Auto merge of #172 - malisas:malisa-semantic-parent-call, r=fitzgen,emiliobors-servo
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.
2016-11-07Use `clang::Type::is_valid` instead of checking self.kind() against ↵Nick Fitzgerald
CXType_Invalid
2016-11-07Add an option to avoid converting to f32/f64 automatically float types.Emilio Cobos Álvarez
2016-11-07Add `clang::Type::is_valid`Nick Fitzgerald
A helper for checking if the type's kind is not `CXType_Invalid`.
2016-11-07Auto merge of #223 - fitzgen:useful-helpers, r=emiliobors-servo
Useful little helpers for Item and Type Just a couple things I have found helpful when debugging, and should probably exist either way. r? @emilio
2016-11-07Useful little helpers for Item and TypeNick Fitzgerald
2016-11-07Auto merge of #222 - afluth:enum_val_unsigned_option, r=emiliobors-servo
Wrap enum_val_unsigned in an Option Patterned after the changes merged in #220. Fixes #128
2016-11-07Wrap enum_val_unsigned in an OptionAndrew Fluth
2016-11-06make fallible_semantic_parent do ffi call and validationMalisa Smith
2016-11-06Auto merge of #220 - jcdyer:enum_value_signed, r=emiliobors-servo
Wrap enum_val_signed in an Option. Also reorganize calling code to avoid duplicate checking of cursor type. Fixes #127
2016-11-06Restore outer conditional.J. Cliff Dyer
2016-11-06Auto merge of #217 - jcdyer:master, r=emiliobors-servo
Remove unused template_arg_kind Addresses #133
2016-11-06Wrap enum_val_signed in an Option.J. Cliff Dyer
Also reorganize calling function to avoid duplicate checking of cursor type. Fixes #127
2016-11-06Remove unused template_arg_kind function.J. Cliff Dyer
2016-11-06Test for ctypes-prefix, and use-core without libstd.Emilio Cobos Álvarez
2016-11-06Test for --use-core.Emilio Cobos Álvarez
2016-11-06bin: Remove unused import.Emilio Cobos Álvarez
2016-11-06bindgen: Support --use-core and --ctypes-prefix.Emilio Cobos Álvarez
2016-11-06Cargo fmtEmilio Cobos Álvarez
2016-11-06Auto merge of #216 - jeanphilippeD:test_move_to_subpackage, r=emiliobors-servo
Speed up integration tests (move building expectations) Speed up running 'cargo test': -Before: 2'17s -After: 30s Update to use new path: Makefile, .travis.yml, CONTRIBUTING.md, tests/tests.rs Delete unused expectation that fail to compile: tests/expectations/moar_bitfields.rs tests/expectations/variadic_template_args.rs
2016-11-06Auto merge of #215 - cynicaldevil:template-check, r=emiliobors-servo
Added checks for clang::Cursor::template_arg_value Fixes #134. r? @fitzgen
2016-11-06Removed template_arg_value method in clang.rsNikhil Shagrithaya
2016-11-05Speed up integration tests (move building expectations)Jean-Philippe DUFRAIGNE
Speed up running 'cargo test': -Before: 2'17s -After: 30s Update to use new path: Makefile, .travis.yml, CONTRIBUTING.md, tests/tests.rs Delete unused expectation that fail to compile: tests/expectations/moar_bitfields.rs tests/expectations/variadic_template_args.rs For every 'cargo test' run, the bindgen output where built. We already test that the bindgen output match expectations/*.rs, so there is no need to check it build unless the expectation is updated. Move tests/expectations/*.rs to tests/expectations/tests/*.rs and make tests/expectations a new dev-dependency package. This allow running: - cargo test -p tests_expectations In addition to the speed up, we also get a clean output for the build and test run. In particular, a number of warnings are generated that should probably be silenced, and eventually enforced modifying travis to build: - RUSTFLAGS='-D warnings' cargo test -p tests_expectations The benefit of having it as a new package is that it avoid polluting the 'cargo test' output that should focus on bindgen.
2016-11-05Auto merge of #203 - ajnirp:137-pointee-type, r=emiliobors-servo
change return value of Type::pointee_type() to Option<Type> Fixes #137
2016-11-05Auto merge of #214 - KyleMayes:ci, r=emiliobors-servo
Rework CI and add macOS builds Adds 3.9 builds and macOS builds. Clang is installed from llvm.org instead of installed from `apt-get`/`brew` (this is significantly faster, especially on macOS because brew is really slow).
2016-11-05Auto merge of #212 - fitzgen:ignore-macro-expansions, r=emiliobors-servo
Don't be loud about ignoring macro expansion cursors r? @emilio We walk the expanded code already. These cursors are children of the translation unit for some reason, and let you iterate over tokens from before the macro was expanded. Pretty safe to ignore here.
2016-11-04Rework CI and add macOS buildsKyle Mayes
2016-11-04change return value of Type::pointee_type() to Option<Type>Rohan Prinja
2016-11-04Don't be loud about ignoring `using` and `static_assert` cursorsNick Fitzgerald
2016-11-04Don't be loud about ignoring macro expansion cursorsNick Fitzgerald
2016-11-04Auto merge of #210 - fitzgen:dangling-item-id-in-partial-specializations, ↵bors-servo
r=emilio Dangling item id in partial specializations See individual commit messages for details. r? @emilio
2016-11-04Use a known-resolved ItemId as a parent in partial specialization childrenNick Fitzgerald
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`.
2016-11-04Use a temporary for the return value in IteId::next()Nick Fitzgerald
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.
2016-11-04Auto merge of #208 - Natim:123-clang-cursor-definition-option-cursor, r=emiliobors-servo
clang::Cursor::definition should return Option<clang::Cursor> Fixes #123 Paired with @glasserc
2016-11-04clang::Cursor::definition should return Option<clang::Cursor> — Fixes #123Rémy HUBSCHER
Paired with @glasserc
2016-11-04Auto merge of #205 - Natim:131-cursor-ret-type-return-option-type, r=emiliobors-servo
Make clang::Cursor::ret_type return an Option<Type> — Fixes #131 Well apparently nobody is using `Cursor::ret_type` 😢
2016-11-04Rip it out please.Rémy HUBSCHER
2016-11-04Auto merge of #206 - Natim:fix-fmt, r=emiliobors-servo
Some cargo-fmt corrections. While running `cargo fmt` for my PR I realized that other files were touched.
2016-11-04Some cargo-fmt corrections.Rémy HUBSCHER
2016-11-04Make clang::Cursor::ret_type return an Option<Type> — Fixes #131Rémy HUBSCHER
2016-11-03Auto merge of #200 - fitzgen:replace-template-alias, r=emiliobors-servo
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
2016-11-03Allow template aliases to be considered for replacementNick Fitzgerald