summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2017-03-01Fix calling convention propagation for function pointers.Emilio Cobos Álvarez
This sucks, but works. The full solution is a refactoring that needs more thought than the time I'm able to dedicate to bindgen right now, see the comment for details. Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-02-27Add tests for not prepending the enum nameth0rex
2017-02-23Auto merge of #532 - emilio:random-bugfixes, r=fitzgenbors-servo
Add a workaround for #528, and fix #527 r? @fitzgen
2017-02-22objc: Rename protocol traits with prefixMikko Lehtonen
Apparently protocols and interface names live in a separate namespace, so there is a chance of collision, like the NSObject interface implements NSObject category
2017-02-22objc: Implement categories, id, selectorMikko Lehtonen
2017-02-20Merge pull request #530 from flier/padding_array_too_longEmilio Cobos Álvarez
limit padding bytes align less than structure’s
2017-02-19ir: Parse cursor definitions in unions as children of the union.Emilio Cobos Álvarez
2017-02-19force pad bytes before large align fieldFlier Lu
2017-02-19fix wrong align lager than pointer sizeFlier Lu
2017-02-16Rework how bitfields are handled.Emilio Cobos Álvarez
2017-02-15Test typedefed anon structs in C++Kornel Lesiński
2017-02-15Use typedef-derived name for anonymous enumsKornel Lesiński
2017-02-15Use typedef-derived name for anonymous structs and unionsKornel Lesiński
2017-02-14codegen: Use the constness of the inner type when converting array function ↵Emilio Cobos Álvarez
arguments. Fixes https://github.com/servo/rust-bindgen/issues/509 I'm actually surprised we had no tests for this. Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-02-10Auto merge of #504 - emilio:xidorn-template-specialization, r=emiliobors-servo
Don't mangle name in partial specification (with Cargo.lock update)
2017-02-10Don't mangle name in partial specificationXidorn Quan
2017-02-10ir: Cut the parenthood chain in pointers, references and arrays.Emilio Cobos Álvarez
2017-02-10ir: Don't parse non-semantic-children cursor as inner structs.Emilio Cobos Álvarez
Fixes: https://github.com/servo/rust-bindgen/issues/482
2017-02-09Auto merge of #501 - faineance:master, r=fitzgenbors-servo
Rename llvm_stable feature and remove references from docs. Fixes: https://github.com/servo/rust-bindgen/issues/409
2017-02-09remove underscore prefix from feature namefaineance
2017-02-09rename llvm_stable feature, and remove references from docsfaineance
2017-02-09Auto merge of #491 - fitzgen:template-instantiation, r=emiliobors-servo
Template instantiation I very much suspect this needs a rebase, but I haven't done it yet. This is the majority of #446, although it doesn't have the name generation for anonymous named types patches yet (that will be a different PR).
2017-02-08Add a test case for issue #446Nick Fitzgerald
2017-02-08Auto merge of #495 - flier:fix-493, r=emiliobors-servo
check layout align before padding bytes Fix issue #493 again :S Still finding way to reproduce it
2017-02-08check layout align before padding bytesFlier Lu
2017-02-08codegen: Fix remaining cases of missing core prefix.Emilio Cobos Álvarez
2017-02-08Auto merge of #480 - flier:impl-default, r=emiliobors-servo
Implement `Default` trait We need `Default` trait to handle so many auto generated fields when create new structure.
2017-02-08Auto merge of #463 - dengjeffrey:whitelist-binding-panic, r=emiliobors-servo
Added catch_unwind to catch panic at generator Fixes #50 - Adds a `catch_unwind` to catch panic at binding generation. - Prints out a more detailed message that points to the potential misuse of flags, when `generate()` fails. - Added false-by-default `verbose` option flag to specify whether detailed message should be printed for the time being - [x] Ran all test cases - [x] Verified that correct error messages appear when bindings fail to generate - [x] Verified use of verbose flag - [x] Considered changes made by `cargo fmt` r? @emilio
2017-02-08implement Default traitFlier Lu
2017-02-07codegen: Improve the assertion message of the failing layout tests.Emilio Cobos Álvarez
2017-02-07add padding bytes to align strctureFlier Lu
2017-02-05objc: Support method argumentsMikko Lehtonen
2017-02-04Removed verbose option flag from builder, and kept it in optionsJeffrey Deng
2017-02-03Run `cargo fmt`Nick Fitzgerald
2017-02-02Auto merge of #467 - emilio:template-fun-ty, r=fitzgenbors-servo
ir: Don't recurse too much looking for canonical types. Fixes https://github.com/servo/rust-bindgen/issues/405 r? @fitzgen
2017-02-02ir: Don't recurse too much looking for canonical types.Emilio Cobos Álvarez
2017-02-02Auto merge of #443 - scoopr:objc, r=emiliobors-servo
Add initial Objective C support Hi! I made an attempt to support parsing objective c headers. This is very much incomplete, and likely not quite yet ready for merging, but I thought I'd share the progress so far. Comments appreciated, I'm still very much a newbie in just about everything related to this change (rust as a language, rust ast, libclang, rust-bindgen), and there were many parts of code I wasn't quite sure about. Commit message: It parses interfaces and protocol but ignores base classes, methods that don’t have arguments, the arguments are currently ignored. Also you can pass objc class instances to C functions. Next steps are inheritance/base classes, method signatures, properties, categories. Then check with system headers what is missing.
2017-02-02ir: Fix is_in_non_fully_specialized_template check.Emilio Cobos Álvarez
Fixes https://github.com/servo/rust-bindgen/issues/462
2017-01-31Add initial Objective C supportMikko Lehtonen
It parses interfaces and protocol but ignores base classes, and their methods which don’t have arguments, the method signature is currently ignored. Also you can pass objc class instances to C functions. Next steps are inheritance/base classes, method signatures, properties, categories. Then check with system headers what is missing.
2017-01-30codegen: ignore aliases for decltypes we can't resolve.Emilio Cobos Álvarez
We do the same for template parameters with `typename` on aliases. This is not great, but it's better than generating invalid code.
2017-01-30Force copy for incomplete arrays.Emilio Cobos Álvarez
These aren't extremely great, since this usually requires extra bookkeeping. But C allows it, so let's keep the same semantics.
2017-01-29extract unsafe ZeroedSizeArray traitFlier Lu
2017-01-29more test cases for zero length array and incomplete arrayFlier Lu
2017-01-28generate helper class to access incomplete arrayFlier Lu
2017-01-28treat incomplete array as zero length arrayFlier Lu
fix issue #455
2017-01-27codegen: Derive stuff in forward declarations.Emilio Cobos Álvarez
So Rust is happy when you use them in template parameters, since the Derive implementations can't catch this otherwise.
2017-01-26Trace constructors in CompInfo's TypeCollector implNick Fitzgerald
Fixes #447
2017-01-26ir: Allow whitelisting non-recursivelyv0.20.3Emilio Cobos Álvarez
Fixes #429
2017-01-26codegen: Add an option to skip comment generation.Emilio Cobos Álvarez
This is mostly a work around https://github.com/servo/rust-bindgen/issues/426, until we implement the proper fix.
2017-01-26Auto merge of #370 - cynicaldevil:detect-forward, r=emiliobors-servo
Forward declared structs now generate opaque enums @emilio : I checked the test outputs again, and it seems that these changes are affecting struct *definitions* as well. Hence, I have not committed the test changes yet. Fixes #62