Add test case for PR 3675.

llvm-svn: 65635
This commit is contained in:
Ted Kremenek 2009-02-27 16:48:08 +00:00
parent 97084b8481
commit dd34e06eeb
1 changed files with 16 additions and 0 deletions

16
clang/test/Sema/PR3675.c Normal file
View File

@ -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;