diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:06:01 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:06:01 +0000 |
commit | 486754660bb926339aefcf012a3f848592babb8b (patch) | |
tree | ecdbc446c9876f4f120f701c243373cd3cb43db3 /test/ASTMerge/struct/Inputs/struct1.c | |
parent | 55e6d896ad333f07bb3b1ba487df214fc268a4ab (diff) |
Notes
Diffstat (limited to 'test/ASTMerge/struct/Inputs/struct1.c')
-rw-r--r-- | test/ASTMerge/struct/Inputs/struct1.c | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/test/ASTMerge/struct/Inputs/struct1.c b/test/ASTMerge/struct/Inputs/struct1.c index 0f3e8b9bc3ebf..a85aec70a84ce 100644 --- a/test/ASTMerge/struct/Inputs/struct1.c +++ b/test/ASTMerge/struct/Inputs/struct1.c @@ -77,3 +77,65 @@ typedef struct { } S13; S13 x13; + +// Matches +struct Unnamed { + union { + struct { + int i; + } S; + struct { + float i; + } R; + } U; +} x14; + +// Matches +struct DeepUnnamed { + union { + union { + struct { + long i; + } S; + struct { + int i; + } R; + } U1; + union { + struct { + long i; + } S; + struct { + float i; + } T; + } U2; + } U; + struct { + long i; + } V; +} x15; + +// Mismatch due to unnamed struct used internally +struct DeepUnnamedError { + union { + union { + struct { + long i; + } S; + struct { + int i; + } R; + } U1; + union { + struct { + long i; // Mismatch here. + } S; + struct { + float i; + } T; + } U2; + } U; + struct { + long i; + } V; +} x16; |