1 // RUN: %clang_cc1 -fsyntax-only -verify %s
5 static int v1
; // expected-note{{previous declaration is here}}
6 int v1
; //expected-error{{duplicate member 'v1'}}
7 int v
; //expected-note 2{{previous definition is here}} \
8 // expected-note{{previous declaration is here}}
9 static int v
; //expected-error{{redefinition of 'v' as different kind of symbol}}
10 int v
; //expected-error{{duplicate member 'v'}}
11 static int v
; //expected-error{{redefinition of 'v' as different kind of symbol}}
12 enum EnumT
{ E
= 10 }; // expected-note {{declared here}}
14 struct X
; //expected-note{{forward declaration of 'S::X'}}
18 S::EnumT Evar
= S::E
; // ok
19 S::EnumT Evar2
= EnumT(); //expected-error{{use of undeclared identifier 'EnumT'; did you mean 'S::EnumT'?}}
20 S::M m
; //expected-error{{no type named 'M' in 'S'}}
21 S::X x
; //expected-error{{variable has incomplete type 'S::X'}}
26 static int v2
; // expected-note{{previous declaration is here}}
27 static int v2
; //expected-error{{duplicate member 'v2'}}
44 int S4::v4
; //expected-note{{previous definition is here}}
45 int S4::v4
; //expected-error{{redefinition of 'v4'}}
49 static int v5
; //expected-note{{previous definition is here}}
50 void v5() { } //expected-error{{redefinition of 'v5' as different kind of symbol}}
52 void v6() { } //expected-note{{previous definition is here}}
53 static int v6
; //expected-error{{redefinition of 'v6' as different kind of symbol}}
56 void v7(int) { } //expected-note{{previous definition is here}}
57 static int v7
; //expected-error{{redefinition of 'v7' as different kind of symbol}}
60 int v8(int); //expected-note{{previous declaration is here}}
61 int v8
; //expected-error{{duplicate member 'v8'}}
72 void foo(bool bar
= true);
88 void foo(int = sizeof(Y
));