summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2020-07-21Change non-fatal errors to warningsleo60228
2020-07-20Remove obsoleted `is_loaded` checksDarren Kulp
It is not clear what version of libclang these supported. Refer to #1321, #1304, #916, #915.
2020-07-20Remove testing_only_libclang_3_8 and expectationsDarren Kulp
2020-07-20Simplify handle_function_macro for clang 3.9+Darren Kulp
2020-07-20Stop accommodating libclang 3.8Darren Kulp
2020-07-20Stop accommodating libclang < 3.8Darren Kulp
2020-07-20Avoid needless `std::mem::replace`Darren Kulp
In Rust 1.45.0, `std::mem::replace` gained the `#[must_use]` attribute, causing a new diagnostic for some `bindgen` code : error: unused return value of `std::mem::replace` that must be used --> src/ir/comp.rs:751:17 | 751 | / mem::replace( 752 | | self, 753 | | CompFields::AfterComputingBitfieldUnits { 754 | | fields, 755 | | has_bitfield_units, 756 | | }, 757 | | ); | |__________________^ | = note: `-D unused-must-use` implied by `-D warnings` = note: if you don't need the old value, you can just assign the new value directly error: unused return value of `std::mem::replace` that must be used --> src/ir/comp.rs:760:17 | 760 | mem::replace(self, CompFields::ErrorComputingBitfieldUnits); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: if you don't need the old value, you can just assign the new value directly error: aborting due to 2 previous errors
2020-07-06main: Remove unused use statement.Emilio Cobos Álvarez
2020-07-01lib: Trivially fix various command line arguments that are not properly ↵Emilio Cobos Álvarez
round-tripping.
2020-07-01Refine test for C++ operatorsDarren Kulp
2020-06-29lib: Fix msrv build.Emilio Cobos Álvarez
error[E0277]: the trait bound `std::string::String: std::convert::From<&std::string::String>` is not satisfied --> src/lib.rs:460:37 | 460 | output_vector.push(line.into()); | ^^^^ the trait `std::convert::From<&std::string::String>` is not implemented for `std::string::String`
2020-06-29Properly shell quote flags in test outputTravis Finkenauer
2020-06-29Simplify multiple headers testTravis Finkenauer
Ensure that we try to generate() the test Builder. Remove unnecessary reserve() optimization.
2020-06-29Handle multiple headers for command_line_flags()Travis Finkenauer
Output from Builder::command_line_flags() would fail if more than one header were provided. This adds extra headers via the '-include' clang option.
2020-06-29lib: Stop using count() to do for loops.Emilio Cobos Álvarez
This itched me when reviewing #1816. Seems easier to switch those to loop over `get_items()`, but this patch also deduplicates the code a bit, because all that copy-pasta was also itching me. These flags don't have ordering dependencies, so the result builder should be equivalent.
2020-06-29Emit bindgen version in generated headerDarren Kulp
Update expectations
2020-06-29Add option to disable generated header commentDarren Kulp
2020-06-29Output clang args after '--'Travis Finkenauer
For command_line_flags(), some arguments (like '--no-record-matches') were added after '--'. The bindgen program would interpret these as clang args.
2020-06-21Generate func_macro callbacksDarren Kulp
2020-06-21Introduce func_macro to ParseCallbacks traitDarren Kulp
2020-06-21Introduce is_macro_function_likeDarren Kulp
2020-06-21Introduce extent to ClangTokenDarren Kulp
2020-06-15Permit IntKind::Custom to represent Paths instead of just IdentsAlan Egerton
2020-06-15Derive traits for newtype aliases (#1802)eggyal
2020-06-08Remove unused Token definition.Emilio Cobos Álvarez
2020-06-08Mangle items with the same name as Rust primitive typeskellda
2020-06-07Fix warning introduced in recent objective-c work.Emilio Cobos Álvarez
2020-06-05Document BINDGEN_EXTRA_CLANG_ARGS env variableTravis Finkenauer
Feature was originally introduced in pull-request #1537
2020-05-18add command-line option for disabling untagged unionsNathan Froyd
One more thing that we can configure from the command line.
2020-05-14ir: Fall back to get the cursors from the type if we find no param decls.Emilio Cobos Álvarez
It seems libclang sometimes doesn't expose the right paramdecl cursors. This should be reported upstream, but it's easy enough to workaround. It loses the parameter names which is a bit unfortunate but... Fixes #1778
2020-05-11Added inheritance to objective-c support.Sebastian Imlay
2020-05-04Do not emit Rust method wrapper for blacklisted functionsStephen Crane
We should not emit Rust struct methods corresponding to a C++ method unless we are actually emitting a binding for that method.
2020-04-27Run `cargo fmt`Joshua Nelson
2020-04-27Upgrade to 2018 editionJoshua Nelson
2020-04-27Run `cargo fix --edition`Joshua Nelson
2020-04-26Really minor cleanup.Emilio Cobos Álvarez
2020-04-23Generator docs: add note about clang documentation string optionsMatej Laitl
I believe this should fix #1265.
2020-04-23Generator docs: mention the word docstring(s) for discoverabilityMatej Laitl
That was what I was searching for initially, make life of future me (and others, hopefully) easier.
2020-04-23Generator docs: use rich text link instead of plain url in textMatej Laitl
2020-03-25Indicate undefined behaviour in enum docs and point to alternativeAphek
2020-03-16Added some initial constraints to the objective-c bindgen stuffSebastian Imlay
2020-03-10ir: Remove redundant parenthesis.Emilio Cobos Álvarez
2020-02-24Delay invoking clang version checks until a functional path is takenKent Fredric
This allows avoiding large numbers of system calls to dynaload clang to determine its version, when no action is performed, for example: - When calling --version / -V - When calling --help This improves the raw responsivity from: Before: time bindgen --help # 0.593s strace -cf bindgen --help # 83k syscalls, 64k to statx After: time bindgen --help # 0.004s strace -cf bindgen --help # 90 syscalls However, it does mean that you can no longer obtain the discovered clang version with: RUST_LOG=info bindgen -V But this may be remedied in a future commit. Closes: https://github.com/rust-lang/rust-bindgen/issues/1736
2020-02-21propose adding host v. target architecture mismatch to problem listbunnie
I spent an afternoon scratching my head on this one before I ran into https://github.com/rust-lang/rust-bindgen/issues/1728. Since the error message welcomes PRs...
2020-02-19Update deprecated methods in builder exampleJonas Platte
2020-02-17var: Constant arrays of const elements should not generate `static mut`s.Emilio Cobos Álvarez
Fixes #1727
2020-02-03options: Add an opt-in to recover the size_t behavior removed in 5d38f2ac.Emilio Cobos Álvarez
2020-02-02ir: codegen: Handle too large bitfield units.Emilio Cobos Álvarez
By not generating various code for it. In the future, we could improve on this by splitting contiguous bitfield units, if needed, so that we can implement them without dealing with rust array derive limits. Fixes #1718
2020-02-02ir: Deindent some code trivially.Emilio Cobos Álvarez
2020-01-29ir: Account for packedness when computing bitfield sizes.Emilio Cobos Álvarez
Fixes #1716