diff options
author | Aleksei Sidorin <a.sidorin@samsung.com> | 2018-04-05 15:31:49 +0000 |
---|---|---|
committer | Aleksei Sidorin <a.sidorin@samsung.com> | 2018-04-05 15:31:49 +0000 |
commit | 499de6ccbe96aa8dbf0d777dbfc8127ad7ae8cda (patch) | |
tree | fb8bb562bb9c61665195c4f7ed828586b87bafc7 /clang/test/ASTMerge/struct/Inputs/struct2.c | |
parent | 4b3eefa5e84484da29cd95df8c7c0946a07bc98a (diff) | |
download | bcm5719-llvm-499de6ccbe96aa8dbf0d777dbfc8127ad7ae8cda.tar.gz bcm5719-llvm-499de6ccbe96aa8dbf0d777dbfc8127ad7ae8cda.zip |
[ASTImporter] Fix for importing unnamed structs
Patch by Peter Szecsi!
Differential Revision: https://reviews.llvm.org/D30876
llvm-svn: 329301
Diffstat (limited to 'clang/test/ASTMerge/struct/Inputs/struct2.c')
-rw-r--r-- | clang/test/ASTMerge/struct/Inputs/struct2.c | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/clang/test/ASTMerge/struct/Inputs/struct2.c b/clang/test/ASTMerge/struct/Inputs/struct2.c index 7fe17a576b2..49fe36d823d 100644 --- a/clang/test/ASTMerge/struct/Inputs/struct2.c +++ b/clang/test/ASTMerge/struct/Inputs/struct2.c @@ -74,3 +74,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 { + float i; // Mismatch here. + } S; + struct { + float i; + } T; + } U2; + } U; + struct { + long i; + } V; +} x16; |