summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-02-27 17:07:01 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-02-27 17:07:01 +0000
commit8d42281150d2b41ea574aa194f3755ba2b54a838 (patch)
tree45d9c627aeb18184cb041d0327f41b7c64c5047f
parentdd34e06eeb5266d240d4a2e54108126f7173a88f (diff)
downloadbcm5719-llvm-8d42281150d2b41ea574aa194f3755ba2b54a838.tar.gz
bcm5719-llvm-8d42281150d2b41ea574aa194f3755ba2b54a838.zip
Add coverage of "member of anonymous union redeclares ..." diagnostic.
llvm-svn: 65637
-rw-r--r--clang/test/Sema/anonymous-struct-union.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/Sema/anonymous-struct-union.c b/clang/test/Sema/anonymous-struct-union.c
index b288f6278a3..4e699ab2ff4 100644
--- a/clang/test/Sema/anonymous-struct-union.c
+++ b/clang/test/Sema/anonymous-struct-union.c
@@ -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'}}
+ };
+};
OpenPOWER on IntegriCloud