Add coverage of "member of anonymous union redeclares ..." diagnostic.

llvm-svn: 65637
This commit is contained in:
Daniel Dunbar 2009-02-27 17:07:01 +00:00
parent dd34e06eeb
commit 8d42281150
1 changed files with 8 additions and 0 deletions

View File

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