summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2017-08-25Rewrite the `has destructor` analysis as a fixed-point analysis in the ↵Benjamin Dahse
monotone framework
2017-08-24Simplify helpers::blobMalo Jaffré
Thanks @fitzgen for the detailed instructions. Fixes #928.
2017-08-21Can derive EqZhiting Zhu
2017-08-21Rename `TypeKind::Named` to `TypeKind::TypeParam`Anna Liao
Also renames a bunch of other things referring to named types to refer to type parameters. Fixes #915
2017-08-19Update doc for unionsTravis Finkenauer
Addresses #832
2017-08-17Auto merge of #920 - photoszzt:fix_comments, r=emiliobors-servo
Fix misleading comments r? @fitzgen or @emilio
2017-08-16Fix misleading commentsZhiting Zhu
2017-08-16Check if `clang_Type_getNumTemplateArguments` is loaded before useNick Fitzgerald
Older clang don't have it, and while we can't pass our whole test suite with those older clangs, we can still generate simple C bindings, so it makes sense not to panic for C++ only things.
2017-08-14Only compute which types we can derive PartialEq for if we'll use itNick Fitzgerald
If we aren't going to derive `PartialEq`, then it doesn't make sense to even run the analysis.
2017-08-14Auto merge of #912 - fitzgen:only-run-analyses-if-needed, r=emiliobors-servo
Only run analyses when we are going to use their results Currently, there are various analyses related to deriving various traits that we unconditionally run. However, if we aren't going to derive those traits in codegen, then computing whether or not we can derive the traits is wasteful. r? @emilio
2017-08-14Only run analyses when we are going to use their resultsNick Fitzgerald
Currently, there are various analyses related to deriving various traits that we unconditionally run. However, if we aren't going to derive those traits in codegen, then computing whether or not we can derive the traits is wasteful.
2017-08-14Can derive PartialEq analysisZhiting Zhu
2017-08-14Disables --rustfmt-bindgens by defaultBastian Köcher
2017-08-14Improves error handling for rustfmtBastian Köcher
2017-08-14Renames format-* command-line arguments to rustfmt-*Bastian Köcher
The --rustfmt-configuration-file command-line argument automatically activates --rustfmt-bindings.
2017-08-14Fixes compilation warnings with rustc 1.21.0-nightly (13d94d5fa 2017-08-10)Bastian Köcher
2017-08-14Adds support for running rustfmt on generated bindingsBastian Köcher
This patch enables bindgen to run rustfmt on generated bindings. Rustfmt is used from the global PATH. Two new command-line arguments are added: 1. --format-bindings: Enables running rustfmt 2. --format-configuration-file: The configuration file for rustfmt (not required).
2017-08-14Auto merge of #909 - bkchr:union_fix, r=emiliobors-servo
Fixes alignment errors with new Rust union type This fix creates a new private field with the required aligned size. This new private field ensures that the union has the required size. This fixes: #908
2017-08-14Fixes alignment errors with new Rust union typeBastian Köcher
This fix creates a new private field with the required aligned size. This new private field ensures that the union has the required size.
2017-08-14Auto merge of #911 - upsuper:layout-test-name, r=emiliobors-servo
Stablize name of reference and nested combination of ref, ptr, and array
2017-08-14Remove Type::is_valid_identifierXidorn Quan
2017-08-14Auto merge of #892 - tmfink:feature-832-custom-rust-target, r=emiliobors-servo
Re-add --rust-target option to replace --unstable-rust Re-apply commit. Addresses #832 Instead of specifying whether or not to use stable, specify the Rust release to support (one of several stable/beta releases or nightly). The `--unstable-rust` option is still accepted and implies nightly. The definitions of `RustTarget` and `RustFeatures` are created with macros. For each test that uses unions, there is a version that uses the latest stable and 1.0.
2017-08-14Stablize name of reference and nested combination of ref, ptr, and arrayXidorn Quan
2017-08-13Re-add --rust-target to replace --unstable-rustTravis Finkenauer
Instead of specifying whether or not to use stable, specify the Rust release to support (one of several stable/beta releases or nightly). The `--unstable-rust` option is still accepted and implies nightly. The definitions of `RustTarget` and `RustFeatures` are created with macros. For each test that uses unions, there is a version that uses the latest stable and 1.0. This also fixes the bug where unions were generated with non-Copy fields.
2017-08-13ir: Sanitize base names more aggressively.Emilio Cobos Álvarez
This fixes stylo build failures when template instantiations tests caused a rust compile error due to a bad test name. This commit makes names better sanitized, preventing similar errors in the future.
2017-08-10Auto merge of #899 - bkchr:manual_debug_impl, r=fitzgenbors-servo
Implements Debug trait for types which do not support derive Debug For types that do not support derive Debug be implemented automatically by rust, we know can generate implementations of the Debug trait. This code generation is hidden behind the '--force-derive-debug' command-line flag. Should solve: #875 Sorry for the extra noise in lib.rs, codegen/mod.rs etc, that was rustfmt.
2017-08-11Renames cli --force-derive-debug to --impl-debugBastian Köcher
2017-08-10Adds ImplDebug trait for creating the Debug trait implementationsBastian Köcher
2017-08-10Implements Debug trait for types which do not support derive DebugBastian Köcher
For types that do not support derive Debug be implemented automatically by rust, we know can generate implementations of the Debug trait. This code generation is hidden behind the '--force-derive-debug' command-line flag.
2017-08-09Can derive Hash analysiszzhu
2017-08-04Revert "Add --rust-target to replace --unstable-rust"Nick Fitzgerald
This reverts commit 0bb7b9f1c4652f63f41eba4064b79c044fd3d955. It turns out our CI stopped running test expectations in an earlier regression (from d73507e; fix incoming) and so this pull request actually introduced a bunch of failures when compiling the test expectations and running their unit tests :(
2017-08-04Add --rust-target to replace --unstable-rustTravis Finkenauer
Instead of specifying whether or not to use stable, specify the Rust release to support (one of several stable/beta releases or nightly). The --unstable-rust option is still accepted and implies nightly. The definitions of `RustTarget` and `RustFeatures` are created with macros. For each test that uses unions, there is a version that uses the latest stable release and stable 1.0.
2017-08-03Auto merge of #889 - photoszzt:fix_recursive_whitelist_opaque, r=fitzgenbors-servo
Fix recursive whitelisting and handling of opaque for derive default Fix regression of derive default analysis. Also fix opaque handing exposed by the above fix. r? @fitzgen
2017-08-03Can derive copy analysiszzhu
2017-08-02Clean up trivially derive debugzzhu
2017-08-02Fix recursive whitelisting and handling of opaquezzhu
Fix regression of derive default analysis. Also fix opaque handing exposed by the above fix.
2017-08-01Not derive Copy for C flexible array memberWangshan Lu
2017-08-01Support deriving copy for large arrayWangshan Lu
2017-07-31Clean up left over derive debug nitszzhu
2017-07-31Auto merge of #861 - photoszzt:derive_default, r=fitzgenbors-servo
Can derive default analysis r? @fitzgen
2017-07-31Stablize name of pointer and arrayXidorn Quan
2017-07-28Auto merge of #863 - fitzgen:rm-used, r=emiliobors-servo
Remove the incomplete `--dummy-uses` feature This would generate dummy uses of all the whitelisted types, which we were planning on eventually using to generate DWARF for more layout testing of our types, but we decided that isn't worth the trouble. Kill it! r? @emilio
2017-07-28Remove the incomplete `--dummy-uses` featureNick Fitzgerald
This would generate dummy uses of all the whitelisted types, which we were planning on eventually using to generate DWARF for more layout testing of our types, but we decided that isn't worth the trouble. Kill it!
2017-07-27Auto merge of #860 - emilio:issue-848, r=fitzgenv0.29.0bors-servo
lib: Filter out include paths when looking for clang paths. Fixes #848
2017-07-27can derive default analysiszzhu
2017-07-27Remove the `CanDeriveDebug::Extra` associated typeNick Fitzgerald
Similar to `HasVtable::Extra`, it is no longer needed.
2017-07-27Remove unused `CanDeriveDebug` implNick Fitzgerald
2017-07-27Remove unused `HasVtable::Extra` associated typeNick Fitzgerald
This is a throwback from the old, ad-hoc computation before we used the fixpoint analysis.
2017-07-27lib: Filter out include paths when looking for clang paths.Emilio Cobos Álvarez
2017-07-26Report what the unknown generate item was when parsing `--generate`Nick Fitzgerald