diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-02-27 16:48:08 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-02-27 16:48:08 +0000 |
commit | dd34e06eeb5266d240d4a2e54108126f7173a88f (patch) | |
tree | 27fe24de176d34198bbcc67e972d3da2c56f19a8 /clang | |
parent | 97084b848162b0a0a7584bcca8aaf33057c5e091 (diff) | |
download | bcm5719-llvm-dd34e06eeb5266d240d4a2e54108126f7173a88f.tar.gz bcm5719-llvm-dd34e06eeb5266d240d4a2e54108126f7173a88f.zip |
Add test case for PR 3675.
llvm-svn: 65635
Diffstat (limited to 'clang')
-rw-r--r-- | clang/test/Sema/PR3675.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/Sema/PR3675.c b/clang/test/Sema/PR3675.c new file mode 100644 index 00000000000..9c86d8cbcf5 --- /dev/null +++ b/clang/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; |