diff options
| author | Gabor Horvath <xazax.hun@gmail.com> | 2017-04-03 11:57:11 +0000 | 
|---|---|---|
| committer | Gabor Horvath <xazax.hun@gmail.com> | 2017-04-03 11:57:11 +0000 | 
| commit | 3d2c10d941844e5abec6e5058de90ed132d4f145 (patch) | |
| tree | 5a32277d30932d4ee5f07de17a27fc19daedcdbb /clang/test/ASTMerge/struct/Inputs/struct1.c | |
| parent | 5558ba2d82d7e6c0d30a3a3c1a3de790ca6abac3 (diff) | |
| download | bcm5719-llvm-3d2c10d941844e5abec6e5058de90ed132d4f145.tar.gz bcm5719-llvm-3d2c10d941844e5abec6e5058de90ed132d4f145.zip | |
[ASTImporter] Fix for importing unnamed structs
Patch by Peter Szecsi!
Differential Revision: https://reviews.llvm.org/D30876
llvm-svn: 299355
Diffstat (limited to 'clang/test/ASTMerge/struct/Inputs/struct1.c')
| -rw-r--r-- | clang/test/ASTMerge/struct/Inputs/struct1.c | 62 | 
1 files changed, 62 insertions, 0 deletions
| diff --git a/clang/test/ASTMerge/struct/Inputs/struct1.c b/clang/test/ASTMerge/struct/Inputs/struct1.c index 0f3e8b9bc3e..a85aec70a84 100644 --- a/clang/test/ASTMerge/struct/Inputs/struct1.c +++ b/clang/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; | 

