summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-10-12Automatically run `creduce` in `csmith-fuzzing/driver.py`Nick Fitzgerald
Reduced test cases FTW \o/
2017-10-12Auto merge of #1079 - fitzgen:move-self-into-gen, r=pepyakinbors-servo
Move `self` into `ir::BindgenContext::gen` Small clean up. See each commit for details. r? @pepyakin
2017-10-12Make `ir::BindgenContext::gen` take ownership of `self`Nick Fitzgerald
`bindgen` follows a pipeline architecture, and we only ever generate bindings once. By taking ownership of `self`, we can enforce this. We can also remove checks inside `gen` for whether we have resolved type refs or not, since we now know that we haven't because it is guaranteed to only be called the one time.
2017-10-12Do not make `parse_one` publicNick Fitzgerald
`parse_one` was never supposed to be public and it uses a bunch of non-public types as a parameters, so downstream crates wouldn't be able to call it anyways.
2017-10-12Auto merge of #1078 - fitzgen:bitfield-width, r=pepyakinbors-servo
Rename `bitfield` to `bitfield_width` Its more clear what the methods/fields are returning/storing when we add "width" to the name. r? @pepyakin
2017-10-12Rename `bitfield` to `bitfield_width`Nick Fitzgerald
Its more clear what the methods/fields are returning/storing when we add "width" to the name.
2017-10-11Auto merge of #1077 - Eijebong:clang-sys, r=emiliobors-servo
Update clang-sys to 0.21 and bump version
2017-10-11Update clang-sys to 0.21 and bump versionBastien Orivel
2017-10-11Auto merge of #1075 - pepyakin:fix-1034, r=fitzgenbors-servo
Use `repr(packed)` If struct requires explicit alignment of 1. Fixes #1034
2017-10-11Handle explicit align=1.Sergey Pepyakin
2017-10-11Refactor requires_explicit_alignSergey Pepyakin
2017-10-11Auto merge of #1073 - liranringel:linux-default-target, r=pepyakinbors-servo
Make the default target for expectation files as x86_64-unknown-linux Solves https://github.com/rust-lang-nursery/rust-bindgen/issues/1067 I didn't check it on macos because I don't have one, but it will be a surprise if it doesn't work.
2017-10-11Give explicit target to builder tests.Sergey Pepyakin
2017-10-11Make the default target for expectation files as x86_64-unknown-linuxLiran Ringel
2017-10-10Auto merge of #1071 - pepyakin:emit-hex-bitfield-masks, r=fitzgenbors-servo
Emit hex bitfield masks r? @fitzgen
2017-10-10Emit hex bitfield masksSergey Pepyakin
2017-10-10Auto merge of #1068 - fitzgen:predicate-script, r=pepyakinbors-servo
Factor out a general purpose predicate script from the `csmith` driver This allows it to be used by both fuzzers and when using `creduce`. See each commit for details. r? @pepyakin
2017-10-10Auto merge of #1065 - liranringel:thiscall, r=fitzgenbors-servo
Add support for the thiscall ABI Fixes https://github.com/rust-lang-nursery/rust-bindgen/issues/541 The thiscall ABI is experimental, so in order to use it nightly is required and also the following statement: `#![feature(abi_thiscall)]` That's a problem because the `tests_expectations` crate (in the tests folder) tries to compile it (and stable is required).
2017-10-10Recommend using `predicate.py` with `creduce` in CONTRIBUTING.mdNick Fitzgerald
It is a lot more streamlined than writing a big nasty ol' bash script.
2017-10-10Make the `csmith` driver use `predicate.py` instead of its own half ↵Nick Fitzgerald
reimplementation
2017-10-10Add a predicate script for determining whether `bindgen` can process a given ↵Nick Fitzgerald
header First, `bindgen` is run on the input header. Then the emitted bindings are compiled with `rustc`. Finally, the compiled bindings' layout tests are run. By default, this script will exit zero if all of the above steps are successful, and non-zero if any of them fail. This is appropriate for determining if some test case (perhaps generated with `csmith` or another fuzzer) uncovers any bugs in `bindgen`. However, this script can also be used when reducing (perhaps with `creduce`) a known-bad test case into a new, smaller test case that exhibits the same bad behavior. In this mode, you might expect that the emitted bindings fail to compile with `rustc`, and want to exit non-zero early if that is not the case. See the "reducing arguments" section for details and what knobs are available.
2017-10-09Auto merge of #1066 - pepyakin:bitfields-in-unions, r=fitzgenbors-servo
Bitfields in unions Fixes #744 I think it is WIP for the moment as I didn't run tests locally.
2017-10-10Add support for the thiscall ABILiran Ringel
2017-10-09Fix bitfields in bindgen unionsSergey Pepyakin
2017-10-09Fix bitfields in untagged Rust unionsSergey Pepyakin
2017-10-08Auto merge of #1063 - ↵bors-servo
liranringel:disable-mangling-if-link-name-is-specified, r=emilio Tell LLVM to not mangle names if they're already mangled LLVM mangles the name by default but functions are already mangled because the `link_name` attribute's value is mangled. Prefixing the name with `\u{1}` should tell LLVM to not mangle it. I originally thought it's a bug in rustc, but it was clarified here: https://github.com/rust-lang/rust/issues/45073
2017-10-07Tell LLVM to not mangle names if they're already mangled through link_name ↵Liran Ringel
attribute
2017-10-05Auto merge of #1061 - fitzgen:add-csmith-instructions-to-contributing, ↵bors-servo
r=pepyakin Point to `csmith` instructions from CONTRIBUTING.md r? @pepyakin
2017-10-05Auto merge of #1058 - pepyakin:bitfield-accessors, r=fitzgenbors-servo
Generate bitfield accessor names eagerly @fitzgen r? I'm not sure about `deanonymize_fields`, as we now assign names to data members and also generate names for the bitfield accessors, but can't come up with a better name.
2017-10-05Extend the `csmith` READMENick Fitzgerald
2017-10-05Make the `csmith` driver script executableNick Fitzgerald
2017-10-05Add a blurb about C-Smith fuzzing to CONTRIBUTING.mdNick Fitzgerald
And link to the csmith-fuzzing/README.md file for more details. Fixes #1038
2017-10-05Review fixesSergey Pepyakin
2017-10-05rustfmtSergey Pepyakin
2017-10-05Introduce `with_loaned_item`.Sergey Pepyakin
2017-10-05Make the C-Smith fuzzing README a .md fileNick Fitzgerald
2017-10-05Use bitfield getter_name in impl_debug.Sergey Pepyakin
Also make impl_partialeq test to also cover impl_debug case.
2017-10-05Use bitfield getter_name in impl_partialeqSergey Pepyakin
2017-10-05Eagerly generate bitfield accessor namesSergey Pepyakin
Also clean a bit.
2017-10-04Auto merge of #1060 - aeleos:master, r=fitzgenbors-servo
Make bitfields larger than type opaque @fitzgen r? Fixes #1007 by ensuring that bitfields larger than type will be opaque, ensuring the layout is correct.
2017-10-04Make bitfields larger than type opaque.Oliver Geller
2017-10-04Auto merge of #1059 - aeleos:master, r=fitzgenbors-servo
Remove early anonymous bitfield filtering and consolidate name method This PR is some changes to early bitfield filtering to help fix (#1007) This does not close (#1007), but allows for checking if the bitfield is too large during a later stage. @fitzgen r?
2017-10-04Remove early anonymous bitfield filtering and consolidate name methodOliver Geller
2017-10-02Auto merge of #1012 - pepyakin:derive-partialeq-manually, r=fitzgenbors-servo
Derive partialeq "manually" when possible Fixes #879 r? @fitzgen
2017-10-03Turn comments into doc comments in tests.Sergey Pepyakin
2017-10-03Assert we only gen partialeq for non rust unionsSergey Pepyakin
2017-10-03Use `if let` instead of plain if.Sergey Pepyakin
2017-10-03Derive partialeq "manually" when possibleSergey Pepyakin
Remove derive-partialeq-template-inst test. Add comments. Don't implement PartialEq for incomplete arrays Handle opaque bases and template instantiations Extract constrain_type. Extract `is whitelisted?` check Add failing partialeq-anonfield join for comps Fix: return insert if not whitelisted Delegate TypeRefs and alias to constrain_join. Delegate Template instantiations to constrain_join Add derive-partialeq-pointer.hpp test Update comment. Fix layout alignment larger that array limit Add missing test for derive-partialeq-anonfield.rs Clean Clean Fix typo in opaque-template-inst-member test Remove redudant stmt Add comment on can_supersede. Format impl_partialeq and leave a comment Extract requires_storage into it's own function. Clean
2017-10-02Auto merge of #1050 - fitzgen:strongly-type-ids, r=pepyakinbors-servo
Strongly type ids * [X] `TypeId` * [X] `ModuleId` * [x] `VarId` * [x] `FunctionId`
2017-10-02s/lookup_item_id/lookup/ in method namesNick Fitzgerald
Its not just item ids now, and that name was pretty long...