1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 int f(); // expected-note{{previous declaration is here}}
10 double f(); // expected-error{{functions that differ only in their return type cannot be overloaded}}
19 int y
= Ns::Enumerator
;
22 float f(int); // expected-note{{previous declaration is here}}
26 double f(int); // expected-error{{functions that differ only in their return type cannot be overloaded}}
47 void N::f1::foo(int i
) {
64 int i1
= N::f1::member
;
65 typedef struct N::f1 type1
;
66 int i2
= N::f2::member
;
67 typedef struct N::f2 type2
;
73 int v4
= N::f1::member
;
78 typedef int f2_type(int, int);
81 ::f2_type(1, 2); // expected-error {{excess elements in scalar initializer}}
89 int i
; // expected-note{{'a::a::a::i' declared here}}
95 a::a::i
= 3; // expected-error{{no member named 'i' in namespace 'a::a'; did you mean 'a::a::a::i'?}}
97 a::a::j
= 3; // expected-error-re{{no member named 'j' in namespace 'a::a'{{$}}}}
100 struct Undef
{ // expected-note{{definition of 'Undef' is not complete until the closing '}'}}
105 static int size
= sizeof(Undef
); // expected-error{{invalid application of 'sizeof' to an incomplete type 'Undef'}}
111 return sizeof(Undef
);
116 template <typename T
> struct is_class
{
120 template <typename T
> class ClassChecker
{
122 return is_class
<T
>::value
;
126 template class ClassChecker
<int>;
141 explicit Z(const foo::X
& x
) {}
152 extern "C" void i
; // expected-error{{variable has incomplete type 'void'}}
153 pr12339::FOO
// expected-error{{no type named 'FOO' in namespace 'pr12339'}}
154 } // expected-error{{expected unqualified-id}}