aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-02-27 16:48:08 +0000
committerTed Kremenek <kremenek@apple.com>2009-02-27 16:48:08 +0000
commitbeba7f47d873abe0a532753556511d0dabbb41fa (patch)
tree8468679cb0b7e058c5cbca6575fad6686711425f
parent6028ca1f28c88c308ed36bf0eaef029eeb595f7c (diff)
Add test case for PR 3675.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65635 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Sema/PR3675.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Sema/PR3675.c b/test/Sema/PR3675.c
new file mode 100644
index 0000000000..9c86d8cbcf
--- /dev/null
+++ b/test/Sema/PR3675.c
@@ -0,0 +1,16 @@
+// RUN: clang -verify %s
+//
+// This example was reduced from actual code in Wine 1.1.13. GCC accepts this
+// code, while the correct behavior is to reject it.
+//
+
+typedef struct _IRP {
+ union {
+ struct {
+ union {} u; // expected-note{{previous declaration is here}}
+ struct {
+ union {} u; // expected-error{{error: member of anonymous struct redeclares 'u'}}
+ };
+ } Overlay;
+ } Tail;
+} IRP;