From c8d8fa965e3d34335959923b0079f1d23ca5767d Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Fri, 27 Feb 2009 17:07:01 +0000 Subject: [PATCH] Add coverage of "member of anonymous union redeclares ..." diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65637 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Sema/anonymous-struct-union.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/Sema/anonymous-struct-union.c b/test/Sema/anonymous-struct-union.c index b288f6278a..4e699ab2ff 100644 --- a/test/Sema/anonymous-struct-union.c +++ b/test/Sema/anonymous-struct-union.c @@ -79,3 +79,11 @@ struct s0 { union { int f0; }; }; // 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'}} + }; +}; -- 2.50.1