Commit Graph

2360 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
8e3e585b6e
options: Remove the linking-related options.
They do nothing, and are effectively superseded by --raw-line and friends.

They also tend to confuse people.

Closes #104
2018-03-31 03:28:49 +02:00
Emilio Cobos Álvarez
fb069e9391
Version bump 2018-03-25 20:22:06 +02:00
bors-servo
94f3f6efa8
Auto merge of #1277 - tmfink:issue-1198-bitfield-enum, r=emilio
Handle bitfield enum pattern aliasing

The previous fix for issue #1198 was incomplete.
2018-03-17 21:44:46 -04:00
Travis Finkenauer
c0c1dcafe0 Handle bitfield enum pattern aliasing
The previous fix for issue #1198 was incomplete.
2018-03-17 17:15:36 -04:00
bors-servo
22041e13d0
Auto merge of #1272 - tmfink:issue-1198, r=emilio
Declare precedence on enum types

Fixes issue #1198 where an enum matches the pattern for multiple enum types, such as constified module enum AND rustified enum.

Documents precedence in `Builder` doc comment.
2018-03-13 12:21:39 -04:00
Travis Finkenauer
8c9b3ab4d6 Move issue-1198 tests out of libclang-3.9 dir 2018-03-13 10:45:30 -04:00
bors-servo
9a0edb8654
Auto merge of #1271 - emilio:repr-align, r=xidorn
codegen: Support repr(align)

Fixes #917.
2018-03-13 07:25:45 -04:00
Emilio Cobos Álvarez
853ae4d96c
tests: Test repr(align()) only on nightly for now, make it 1.25 to reflect reality. 2018-03-13 12:25:06 +01:00
Emilio Cobos Álvarez
965dff2904
tests: Add a test for alignas(double). 2018-03-13 12:16:55 +01:00
Emilio Cobos Álvarez
cd7e095091
Breaking version bump. 2018-03-13 12:16:55 +01:00
Emilio Cobos Álvarez
b91583f101
Add a kill-switch for untagged unions.
Otherwise we can't use repr(align) on stylo.
2018-03-13 12:15:47 +01:00
Emilio Cobos Álvarez
96b26b308d
codegen: support repr(align).
Fixes #917
2018-03-13 12:15:47 +01:00
bors-servo
60c3d33676
Auto merge of #1273 - Eijebong:clang, r=emilio
Update clang-sys and bump version
2018-03-13 05:29:33 -04:00
Bastien Orivel
69355f8d9e Update clang-sys and bump version 2018-03-13 10:27:46 +01:00
Travis Finkenauer
c8016c1a1f Document enum variation precedence 2018-03-12 22:48:17 -04:00
Travis Finkenauer
7b99b25129 Fix bug when enum matched multiple types
If an enum matched a pattern for rustified enum and constified module
enum, then rust code would fail to compile with "ambiguous associated
type" error. We fix the error by giving constified module enum "higher
precedence".

Fixes issue #1198
2018-03-11 18:26:31 -04:00
bors-servo
f36f4e3e38
Auto merge of #1268 - emilio:enum-replace, r=fitzgen
ir: Allow replacing enums and enum variants.

Fixes #1267.
2018-03-05 12:19:25 -05:00
Emilio Cobos Álvarez
f9fe3d1571
Merge pull request #1269 from emilio/so-many-questions. r=nox
Untry.
2018-03-05 08:32:14 +01:00
Emilio Cobos Álvarez
cfd153cc64
Untry.
Use the ? operator instead of try, and add some more uses of it on Option<> that
were straight-forward.
2018-03-04 14:43:13 +01:00
Emilio Cobos Álvarez
4c6c9977c8
ir: Allow renaming variants using the replaces="" annotation or a custom callback. 2018-03-04 14:27:08 +01:00
Emilio Cobos Álvarez
27641c23c6
ir: Allow replacing enums. 2018-03-04 14:22:04 +01:00
Emilio Cobos Álvarez
eec4ae1ce2
codegen: Avoid &String. 2018-03-04 14:01:13 +01:00
Emilio Cobos Álvarez
d5ca4e7e90
Merge pull request #1264 from emilio/deprecated-proper. r=fitzgen
lib: Use #[deprecated] properly.
2018-02-27 10:53:24 +01:00
Emilio Cobos Álvarez
5c895698c7
lib: Use #[deprecated] properly.
Fixes #1258
2018-02-26 23:29:48 +01:00
Emilio Cobos Álvarez
3379a90a2d
Merge pull request #1256 from fitzgen/fix-missing-dylibs. r=emilio
Fix missing dylibs
2018-02-14 20:45:15 +01:00
Nick Fitzgerald
8c5f862f82
Merge pull request #1255 from sanmai-NL/patch-1
Check for more common C++ header file extensions
2018-02-14 11:07:28 -08:00
Nick Fitzgerald
ad6b223192 Bump to version 0.33.1 2018-02-14 10:33:03 -08:00
Nick Fitzgerald
eb415c7a7c Revert "Bump quote to 0.4"
This reverts commit 6899c275ee.

The `proc_macro2` crate depends on rustc internal crates, which means that
`bindgen` would need to be run under `rustup`.

We can follow https://github.com/rust-lang/rust/issues/47931 to get updates on
when this issue might be resolved and we can update `quote` again.

Fixes #1248
2018-02-14 10:31:50 -08:00
Sander Maijers
5e49ce9060
Check for more common C++ header file extensions
Also, perform `clang` parameter check earlier. If that results in `is_cpp == true`, the later `|=` operations could be elided.
2018-02-14 18:50:27 +01:00
Emilio Cobos Álvarez
a09a8ff66e
Merge pull request #1253 from Eijebong/log. r=emilio
Update log to 0.4 and bump version
2018-02-13 17:03:25 +01:00
Bastien Orivel
437cd73fcc Update log to 0.4 and bump version 2018-02-13 14:43:18 +01:00
Emilio Cobos Álvarez
174746ffdf
Merge pull request #1251 from emilio/enum-docs. r=pepyakin
codegen: expose enum variant documentation.
2018-02-13 12:37:04 +01:00
Emilio Cobos Álvarez
b1f9cf99bc
tests: Add a test for multiline comments in enum variants. 2018-02-12 20:43:43 +01:00
Emilio Cobos Álvarez
5d04c36441
codegen: Expose variant comments. 2018-02-12 20:41:24 +01:00
bors-servo
079d8383cc
Auto merge of #1246 - emilio:macro-constants, r=nox
ir: Make macro constants not being architecture-dependent.

Fixes #1185
2018-02-04 10:01:54 -05:00
Emilio Cobos Álvarez
ed5776206c
ir: Make macro constants not being architecture-dependent.
Fixes #1185
2018-02-04 15:59:09 +01:00
bors-servo
92b86c5ca3 Auto merge of #1243 - emilio:parse-callbacks, r=fitzgen
callbacks: Introduce MacroParsingBehavior to allow ignoring macros.

This is symmetric, yet less powerful, than enum_variant_behavior.

Fixes #687.
2018-01-31 11:26:31 -06:00
Emilio Cobos Álvarez
b33d329a76
callbacks: Introduce MacroParsingBehavior to allow ignoring macros.
This is symmetric, yet less powerful, than enum_variant_behavior.

Fixes #687.
2018-01-31 00:00:57 +01:00
bors-servo
ce7e69bfbc Auto merge of #1241 - emilio:fwd-decl-no-fun, r=fitzgen
codegen: Make forward declarations go through the more generic path.

Instead of special-casing.

This allows to use the normal flags to control what can be or not derived for
them.

Arguably deriving Copy / Clone is kind of busted for those, but changing this by
default broke tests (RefPtr<ForwardDeclaredType> stopped working for example).

So I think this is a good compromise.

Fixes #1238
2018-01-29 12:43:06 -06:00
bors-servo
6adb002478 Auto merge of #1240 - emilio:virtual-dtor-fix, r=fitzgen
ir: Choose the right mangling for destructors on all codepaths.

Fixes #1133.
2018-01-29 12:20:32 -06:00
bors-servo
821b133702 Auto merge of #1239 - emilio:cyclic-typedef-better, r=fitzgen
codegen: Make the cyclic typedef name detection catch more cases.

By looking through typedefs, we also catch more complex cases like the ones that
appear on Android's stdlib.

Fixes #946
2018-01-29 11:47:55 -06:00
Emilio Cobos Álvarez
34b92160a7
codegen: Make forward declarations go through the more generic path.
Instead of special-casing.

This allows to use the normal flags to control what can be or not derived for
them.

Arguably deriving Copy / Clone is kind of busted for those, but changing this by
default broke tests (RefPtr<ForwardDeclaredType> stopped working for example).

So I think this is a good compromise.

Fixes #1238
2018-01-29 16:43:39 +01:00
Emilio Cobos Álvarez
29705c24aa
ir: Choose the right mangling for destructors on all codepaths.
Fixes #1133.
2018-01-29 15:48:34 +01:00
Emilio Cobos Álvarez
450970dcc1
codegen: Make the cyclic typedef name detection catch more cases.
By looking through typedefs, we also catch more complex cases like the ones that
appear on Android's stdlib.

Fixes #946
2018-01-29 15:13:53 +01:00
bors-servo
8725aea78f Auto merge of #1237 - osialr:feature/str-flags, r=emilio
Support str as input to Builder::no_* functions

Previously, only String was supported on these while other functions in Builder worked with both str and String

This tripped me up because `Builder::constified_enum_module` and `Builder::raw_line` worked with string slices but I got a compile error when I tried to use `Builder:;no_copy`
2018-01-27 22:05:19 -06:00
Ryan Osial
8afc7634d7 Support str as input to Builder::no_* functions
Previously, only String was supported on these while other
functions in Builder worked with both str and String
2018-01-27 16:20:35 -05:00
bors-servo
4d1c95410d Auto merge of #1236 - emilio:with-rustfmt, r=fitzgen
lib: Add a way to override rustfmt path.

I'll need it to format some stuff on mozilla-central.
2018-01-26 16:06:24 -06:00
Emilio Cobos Álvarez
b16e09ce55
Minor version bump. 2018-01-26 23:05:53 +01:00
Emilio Cobos Álvarez
2dc46ac96e
lib: Add a way to override rustfmt path.
I'll need it to format some stuff on mozilla-central.
2018-01-26 21:14:00 +01:00
bors-servo
56bbbb0a15 Auto merge of #1235 - Eijebong:quote, r=fitzgen
Bump quote to 0.4
2018-01-22 18:14:33 -06:00