summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-02-07Auto merge of #490 - manuel-woelker:master, r=fitzgenbors-servo
ty: add tests for Type.is_invalid_named_type() (#460) I didn't add an extra test module, since I couldn't find any precedents in the project. Feedback welcome!
2017-02-07Auto merge of #487 - emilio:assertion-messages, r=fitzgenbors-servo
codegen: Improve the assertion message of failing layout tests. r? @fitzgen cc @flier
2017-02-07ty: add tests for Type.is_invalid_named_type() (#460)Manuel Woelker
2017-02-07codegen: Improve the assertion message of the failing layout tests.Emilio Cobos Álvarez
2017-02-07codegen: Fix the build in older rustc versions.Emilio Cobos Álvarez
2017-02-07Auto merge of #468 - flier:padding-bytes, r=emiliobors-servo
Improve struct alignment with padding bytes I known, it is a little tricky or dirty solution, I have to do a lot of calculate for alignment. For example ```c++ typedef struct { long long __clang_max_align_nonce1 __attribute__((__aligned__(__alignof__(long long)))); long double __clang_max_align_nonce2 __attribute__((__aligned__(__alignof__(long double)))); } max_align_t; ``` will be generated as ```rust pub struct _bindgen_ty_1 { pub __clang_max_align_nonce1: ::std::os::raw::c_longlong, _padding_0: u64, pub __clang_max_align_nonce2: f64, _padding_1: u64, } fn bindgen_test_layout__bindgen_ty_1() { assert_eq!(::std::mem::size_of::<_bindgen_ty_1>() , 32usize); assert_eq! (0usize , unsafe { & ( * ( 0 as * const _bindgen_ty_1 ) ) . __clang_max_align_nonce1 as * const _ as usize }); assert_eq! (16usize , unsafe { & ( * ( 0 as * const _bindgen_ty_1 ) ) . __clang_max_align_nonce2 as * const _ as usize }); } ``` It may generate wrong layout when use template or multi virtual inheritance. At least, it is a begining, pass all the test cases, and some [complex struct](https://github.com/servo/rust-bindgen/compare/master...flier:padding-bytes?expand=1#diff-eda352138aed047149ebeec72d19979d) in wild.
2017-02-07add padding bytes to align strctureFlier Lu
2017-02-06Auto merge of #475 - scoopr:objc, r=emiliobors-servo
objc: Support method arguments Welp, I attempted to get the method arguments working. I must confess, that I have not ran this against actual objective c code yet though.
2017-02-06Make abi optional for FunctionSigMikko Lehtonen
2017-02-05objc: Support method argumentsMikko Lehtonen
2017-02-04Removed verbose option flag from builder, and kept it in optionsJeffrey Deng
2017-02-04Auto merge of #479 - emilio:buildfix, r=Manishearthbors-servo
Also exclude the test crate from packaging. r? @Manishearth
2017-02-04Also CI scripts.Emilio Cobos Álvarez
2017-02-04Also exclude the test crate from packaging.Emilio Cobos Álvarez
2017-02-04Auto merge of #474 - emilio:buildfix, r=fitzgenbors-servo
Don't break the build so fast for older rust versions.
2017-02-04Don't break the build so fast for older rust versions.Emilio Cobos Álvarez
2017-02-03Auto merge of #477 - Manishearth:no-test-publish, r=fitzgenbors-servo
Don't publish tests See https://bugzilla.mozilla.org/show_bug.cgi?id=1336655 r? @emilio @fitzgen
2017-02-03Don't publish testsManish Goregaokar
2017-02-03Auto merge of #473 - fitzgen:fmt-in-ci, r=emiliobors-servo
Assert that code is properly `rustfmt`ed in CI r? @emilio
2017-02-03Auto merge of #472 - fitzgen:cursor-num-template-args, r=emiliobors-servo
Make Cursor::num_template_args slightly more reliable This improves the situation slightly, but even `clang_Type_getNumTemplateArgs` doesn't work for most templates... r? @emilio
2017-02-03Update CONTRIBUTING.md to talk about rustfmt in CINick Fitzgerald
2017-02-03Padd BINDGEN_FEATURES through to the ci scriptsNick Fitzgerald
2017-02-03Source CI scripts to inherit environment varsNick Fitzgerald
2017-02-03Auto merge of #471 - fitzgen:refmt, r=fitzgenbors-servo
Run `cargo fmt` It's been a while, and we have a lot of reformatting with the latest version of `rustfmt`.
2017-02-03Assert that code is properly `rustfmt`ed in CINick Fitzgerald
This commit makes Travis CI reject code which has not been run through the latest version of `rustfmt`. Additionally, it refactors our CI testing out into a couple little scripts.
2017-02-03Make Cursor::num_template_args slightly more reliableNick Fitzgerald
2017-02-03Run `cargo fmt`Nick Fitzgerald
2017-02-03Auto merge of #470 - emilio:template-fun-ty, r=fitzgenbors-servo
Fix a recent template-specialization-related regression. r? @upsuper
2017-02-03Version bump.Emilio Cobos Álvarez
2017-02-03clang: Make the is_fully_specialized_template check less insane.Emilio Cobos Álvarez
This fixes a regression with stylo bindings after the function pointer PR.
2017-02-02Auto merge of #469 - fitzgen:enhanced-clang-ast-dumping, r=emiliobors-servo
Enhance Clang AST dumping This commit extends our existing Clang AST dumping to include more information, such as a cursor's canonical, referenced, and declarations cursors if they exist. It prints out most of the information that libclang gives us directly, but not the information that we attempt to (re)construct on top of the libclang APIs. r? @emilio or @Yamakaky
2017-02-02Do not dump cursor definitionsNick Fitzgerald
This can lead to infinite loops with forward declarations and blow the stack.
2017-02-02Added false-by-default verbose option flagJeffrey Deng
2017-02-02Added catch_unwind to catch panic at generator due to missing or incorrect flagsJeffrey Deng
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-02Enhance Clang AST dumpingNick Fitzgerald
This commit extends our existing Clang AST dumping to include more information, such as a cursor's canonical, referenced, and declarations cursors if they exist. It prints out most of the information that libclang gives us directly, but not the information that we attempt to (re)construct on top of the libclang APIs.
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-02Auto merge of #464 - emilio:osx-testing, r=fitzgenbors-servo
Re-enable OSX builds on Travis CI This reverts commit fc38f9b18a9dacc76b7e8a5c8633f0f02289daae. r? @fitzgen
2017-02-02Re-enable OSX builds on Travis CIEmilio Cobos Álvarez
This reverts commit fc38f9b18a9dacc76b7e8a5c8633f0f02289daae.
2017-02-02Auto merge of #466 - emilio:tpl, r=upsuperbors-servo
ir: Fix is_in_non_fully_specialized_template check. Fixes https://github.com/servo/rust-bindgen/issues/462 r? @upsuper
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-30Auto merge of #461 - emilio:clean-naming, r=fitzgenbors-servo
ir: Cleanup name duplication in aliases and named types. It's just dumb. r? @fitzgen
2017-01-30ir: Cleanup name duplication in aliases and named types.Emilio Cobos Álvarez
It's just dumb.
2017-01-30Auto merge of #384 - emilio:decltype, r=fitzgenbors-servo
codegen: Do the same workaround we do for template parameters with `typename` on aliases for `decltypes` we can't resolve. r? @fitzgen
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-29Auto merge of #457 - emilio:test-array, r=fitzgenbors-servo
tests: Add an integration test for static arrays. Turns out they were broken before https://github.com/servo/rust-bindgen/issues/456. Let's test it so it doesn't regress. r? @fitzgen
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-30tests: Add an integration test for static arrays.Emilio Cobos Álvarez
Turns out they were broken before https://github.com/servo/rust-bindgen/issues/456. Let's test it so it doesn't regress.