forked from rust-lang/rust-bindgen
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't assume that an inner class declaration always immediately yields a
complete type. It might not if we had to avoid recursion when processing types. Detect that case and bail out. This bug was being masked by the fact that we didn't always find definitions for the recursion check and so it didn't trigger, but now that this check is more reliable we have to be careful in more places. The test case was reduced from the GCC STL allocator definition.
- Loading branch information
Showing
3 changed files
with
44 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#![allow( | ||
dead_code, | ||
non_snake_case, | ||
non_camel_case_types, | ||
non_upper_case_globals | ||
)] | ||
|
||
#[repr(C)] | ||
#[derive(Debug, Default, Copy, Clone)] | ||
pub struct Foo { | ||
pub _address: u8, | ||
} | ||
#[repr(C)] | ||
#[derive(Debug, Default, Copy, Clone)] | ||
pub struct Foo_Bar { | ||
pub _address: u8, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
template<typename T> | ||
class Foo { | ||
public: | ||
template<typename U> | ||
struct Bar { | ||
typedef Foo<U> FooU; | ||
}; | ||
}; |