Age | Commit message (Collapse) | Author |
|
|
|
It is not clear what version of libclang these supported.
Refer to #1321, #1304, #916, #915.
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
round-tripping.
|
|
|
|
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`
|
|
|
|
Ensure that we try to generate() the test Builder.
Remove unnecessary reserve() optimization.
|
|
Output from Builder::command_line_flags() would fail if more than one
header were provided. This adds extra headers via the '-include' clang
option.
|
|
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.
|
|
Update expectations
|
|
|
|
For command_line_flags(), some arguments (like '--no-record-matches')
were added after '--'. The bindgen program would interpret these as
clang args.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Feature was originally introduced in pull-request #1537
|
|
One more thing that we can configure from the command line.
|
|
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
|
|
|
|
We should not emit Rust struct methods corresponding to a C++ method
unless we are actually emitting a binding for that method.
|
|
|
|
|
|
|
|
|
|
I believe this should fix #1265.
|
|
That was what I was searching for initially, make life of future me
(and others, hopefully) easier.
|
|
|
|
|
|
|
|
|
|
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
|
|
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...
|
|
|
|
Fixes #1727
|
|
|
|
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
|
|
|
|
Fixes #1716
|