]> granicus.if.org Git - clang/commitdiff
Add coverage of "member of anonymous union redeclares ..." diagnostic.
authorDaniel Dunbar <daniel@zuster.org>
Fri, 27 Feb 2009 17:07:01 +0000 (17:07 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Fri, 27 Feb 2009 17:07:01 +0000 (17:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65637 91177308-0d34-0410-b5e6-96231b3b80d8

test/Sema/anonymous-struct-union.c

index b288f6278a36df3b29f059672b3aa036834bdb88..4e699ab2ff436cc9f816106a0945686602ede9bb 100644 (file)
@@ -79,3 +79,11 @@ struct s0 { union { int f0; }; };
 
 // <rdar://problem/6481130>
 typedef struct { }; // expected-error{{declaration does not declare anything}}
+
+// PR3675
+struct s1 {
+  int f0; // expected-note{{previous declaration is here}}
+  union {
+    int f0; // expected-error{{member of anonymous union redeclares 'f0'}}
+  };
+};