Age | Commit message (Collapse) | Author |
|
Just use the repr name we generate, since we generate constants for that.
It's not worth trying to guess the actual type to use IMO.
Bindings lose a bit of portability I guess, but that's really a lost bet
already, so instead of special-casing bool and map constants, let's use a
consistent representation everywhere.
Fixes #1145
|
|
codegen: Don't generate repr(C) for enums.
That's only undefined for enums with fields.
Fixes #1224
See also: https://botbot.me/mozilla/rustc/2018-01-19/?msg=95934948&page=2
|
|
That's only undefined for enums with fields.
Fixes #1224
See also: https://botbot.me/mozilla/rustc/2018-01-19/?msg=95934948&page=2
|
|
ir: Handle _Complex _Float128 correctly.
Unfortunately we can't test it for the same alignment issues that "long double"
has.
I also included the diagnostic code, just in case it happens again.
|
|
Unfortunately we can't test it for the same alignment issues that "long double"
has.
Fixes #1087
|
|
Added mdbook entry for bitfields.
Fixes #818
|
|
|
|
|
|
|
|
Make CARGO_PKG_VERSION option_env!, rather than env!
|
|
|
|
Clang trunk considers stuff in an anonymous namespace with internal linkage.
|
|
I think that's right, and the previous behavior was just a bug.
Rejigger the tests that show this difference since they aren't testing this in
particular, and avoids adding more per-platform tests.
|
|
codegen: Be consistent about variadic signatures.
Fixes #1216.
|
|
Fix license incompatibility
|
|
Fixes #1216.
|
|
Mark C++ exceptions as unsupported in the book
|
|
Correct type for --whitelist-type doc
|
|
|
|
Fix travis.
Per https://docs.travis-ci.com/user/languages/cpp/, though not super-confident
this will fix it.
|
|
|
|
|
|
Use Metadata::is_dir
|
|
Make issue-816.h compatible with bindgen's 3-clause BSD license.
This fixes issue https://github.com/rust-lang-nursery/rust-bindgen/issues/1206.
|
|
Revert to only calling plain rustfmt
rust-lang-nursery/rustup.rs#1294 added a proxy executable for rustfmt that will act on the correct bundled rustfmt for the default release channel set by rustup.
And, assuming I'm reading the expected release notes correctly, it seems like rust 1.23, due out fairly shortly, will add the bundled version of rustfmt to stable.
This fixes #1184
|
|
|
|
Don't generate symbols for pure virtual functions.
Fixes #1197.
|
|
Fixes #1197.
|
|
Bump to 0.32.1 minor release
rs? @emilio
|
|
|
|
Fixed rendering of a header in the book
|
|
repr(C) on enums
r? @pepyakin or @emilio
|
|
|
|
If we don't, then eddyb's recent layout optimizations will do unexpected things
to them.
We also need to handle empty `enum`s without variants. When `repr(C)` is on a
Rust `enum`, it cannot be empty, so we need to add a dummy.
|
|
|
|
Fix command_line_flags mis-generation of rust-target's flags.
Trying to address issue #1182.
r? @fitzgen
|
|
Expand tests for testing the rust-target flag generated by builder.
|
|
Enable Cargo features for quickchecking crate
Logic to enable/disable special casing (due to known issues #550, #684, and #1153) has been exposed as features in the `quickchecking` crate's Cargo.toml file and corresponding `cfg` attributes in the source.
In addition to adding Cargo features, this PR represents the following:
- Documentation in `bindgen`'s CONTRIBUTING.md that points to a new README.md located in the `quickchecking` crate's directory.
- The Debug trait was implemented for the `HeaderC` type. This enables failing property tests to be reported as C source code rather than a Rust data structure.
- The ArrayDimensionC type is now used in header generation for union, struct, and basic declarations.
Thanks for taking a look and for any feedback!
Closes #1169
r? @fitzgen
|
|
- Fixed misspelling introduced in CONTRIBUTING.md
- Remove `quickchecking -h` output from README.md
|
|
Useful when debugging.
|
|
Bump to 0.32.0
r? @emilio
|
|
|
|
Logic to enable/disable special casing (due to known issues #550, #684, and #1153) has been exposed as features in the `quickchecking` crate's Cargo.toml file and corresponding `cfg` attributes in the source.
In addition to adding Cargo features, this PR represents the following:
- Documentation in `bindgen`'s CONTRIBUTING.md that points to a new README.md located in the `quickchecking` crate's directory.
- The Debug trait was implemented for the `HeaderC` type. This enables failing property tests to be reported as C source code rather than a Rust data structure.
- The ArrayDimensionC type is now used in header generation for union, struct, and basic declarations.
Thanks for taking a look and for any feedback!
Closes #1169
r? @fitzgen
|
|
Update lazy_static to 1.0
|
|
|
|
Add a regression test for issue #816
r? @emilio
|
|
|
|
Quickchecking crate CLI
Prior to this commit the quickchecking crate used for generating proprty tests for bindgen was a [lib] target and had configurations that required commenting/uncommenting code to enable/disable. This meant it was inconvienent/prohibitive to configure the property tests on a per-run basis. This commit reorganizes the `quickchecking` crate to provide both [lib] and [[bin]] targets in order to expose those configurations through a CLI.
The configurations that are exposed through the [[bin]] target's CLI are:
* Count/number of tests to run.
* Directory to provide fuzzed headers
* Generation range corresponding to the range quickcheck uses to
* generate arbitrary.
__Usage from the__ `tests/quickchecking` __directory__
```bash
quickchecking 0.2.0
Bindgen property tests with quickcheck. Generate random valid C code and pass it to the csmith/predicate.py script
USAGE:
quickchecking [OPTIONS]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-c, --count <COUNT> Count / number of tests to run. Running a fuzzed header through the predicate.py script can
take a long time, especially if the generation range is large. Increase this number if you're
willing to wait a while. [default: 2]
-p, --path <PATH> Optional. Preserve generated headers for inspection, provide directory path for header
output. [default: None]
-r, --range <RANGE> Sets the range quickcheck uses during generation. Corresponds to things like arbitrary usize
and arbitrary vector length. This number doesn't have to grow much for that execution time to
increase significantly. [default: 32]
```
Because the actual work of running the property tests moved to the [[bin]]
target, rather than duplicate that code in the `quickchecking` crate's tests
directory, some actual (very basic) tests for the `quickchecking` crate were
added.
*Note: I'm not attached to any of the option flags, if there are better characters/words for any of the options I've exposed I'll be happy to revise!
Also, I'm not sure how palatable the "global singleton" is for managing context (output path) across tests in the `lib.rs` file. Very open to suggestions on how to manage that if it's not an acceptable approach.
Thanks for taking a look, looking forward to feedback!
Closes #1168
r? @fitzgen
|
|
The changes reflected in this PR include the logic to test the
`quickcheking` crate itself. Rather that just validate that the
`quickchecking` crate builds in CI with `cargo check`, we can run
now `cargo test`.
|
|
Prior to this commit the quickchecking crate used for generating proprty
tests
for bindgen was a [lib] target and had configurations that required
commenting/uncommenting code to enable/disable. This meant it was
inconvienent/prohibitive to configure the property tests on a per-run
basis.
This commit reorganizes the `quickchecking` crate to provide both [lib]
and
[[bin]] targets in order to expose those configurations through a CLI.
The configurations that are exposed through the [[bin]] target's CLI
are:
* Count/number of tests to run.
* Directory to provide fuzzed headers
* Generation range corresponding to the range quickcheck uses to
* generate arbitrary.
__Usage from the__ `tests/quickchecking` __directory__
```bash
quickchecking 0.2.0
Bindgen property tests with quickcheck. Generate random valid C code and
pass it to the csmith/predicate.py script
USAGE:
quickchecking [OPTIONS]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-c, --count <COUNT> Count / number of tests to run. Running a
fuzzed header through the predicate.py script can
take a long time, especially if the
generation range is large. Increase this number if you're
willing to wait a while. [default: 2]
-p, --path <PATH> Optional. Preserve generated headers for
inspection, provide directory path for header
output. [default: None]
-r, --range <RANGE> Sets the range quickcheck uses during
generation. Corresponds to things like arbitrary usize
and arbitrary vector length. This number
doesn't have to grow much for that execution time to
increase significantly. [default: 32]
```
Because the actual work of running the property tests moved to the
[[bin]]
target, rather than duplicate that code in the `quickchecking` crate's
tests
directory, some actual (very basic) tests for the `quickchecking` crate
were
added.
*Note: I'm not attached to any of the option flags, if there are better
characters/words for any of the options I've exposed I'll be happy to
revise!
Thanks for taking a look, looking forward to feedback!
Closes #1168
r? @fitzgen
|