[cfe-commits] r65637 - /cfe/trunk/test/Sema/anonymous-struct-union.c

Daniel Dunbar daniel at zuster.org
Fri Feb 27 09:07:01 PST 2009


Author: ddunbar
Date: Fri Feb 27 11:07:01 2009
New Revision: 65637

URL: http://llvm.org/viewvc/llvm-project?rev=65637&view=rev
Log:
Add coverage of "member of anonymous union redeclares ..." diagnostic.

Modified:
    cfe/trunk/test/Sema/anonymous-struct-union.c

Modified: cfe/trunk/test/Sema/anonymous-struct-union.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/anonymous-struct-union.c?rev=65637&r1=65636&r2=65637&view=diff

==============================================================================
--- cfe/trunk/test/Sema/anonymous-struct-union.c (original)
+++ cfe/trunk/test/Sema/anonymous-struct-union.c Fri Feb 27 11:07:01 2009
@@ -79,3 +79,11 @@
 
 // <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'}}
+  };
+};





More information about the cfe-commits mailing list