[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CXX / class / class.union / class.union.anon / p1.cpp
blob31c9313cf53a96c7aa7386140d1605017d04f0fd
1 // RUN: %clang_cc1 -verify %s
3 struct X {
4 int a; // expected-note {{previous}}
5 void b(); // expected-note {{previous}}
6 struct c; // expected-note {{previous}}
7 typedef int d; // expected-note {{previous}}
9 union {
10 int a; // expected-error {{member of anonymous union redeclares}}
11 int b; // expected-error {{member of anonymous union redeclares}}
12 int c; // expected-error {{member of anonymous union redeclares}}
13 int d; // expected-error {{member of anonymous union redeclares}}
14 int e; // expected-note {{previous}}
15 int f; // expected-note {{previous}}
16 int g; // expected-note {{previous}}
17 int h; // expected-note {{previous}}
20 int e; // expected-error {{duplicate member}}
21 void f(); // expected-error {{redefinition}}
22 struct g; // expected-error {{redefinition}}
23 typedef int h; // expected-error {{redefinition}}