1 // RUN: %clang_cc1 -fsyntax-only -verify %s
7 explicit Foo(int); // expected-note {{previous declaration is here}}
10 ((Foo
))(INT
); // expected-error{{cannot be redeclared}}
12 Foo(Foo foo
, int i
= 17, int j
= 42); // expected-error{{copy constructor must pass its first argument by reference}}
14 static Foo(short, short); // expected-error{{constructor cannot be declared 'static'}}
15 virtual Foo(double); // expected-error{{constructor cannot be declared 'virtual'}}
16 Foo(long) const; // expected-error{{'const' qualifier is not allowed on a constructor}}
18 int Foo(int, int); // expected-error{{constructor cannot have a return type}}
20 volatile Foo(float); // expected-error{{constructor cannot have a return type}}
23 Foo::Foo(const Foo
&) { }
28 extern const Anon anon
;
29 extern "C" const Anon anon2
;
31 // PR3188: The extern declaration complained about not having an appropriate
43 Length
l() const { return *this; }
84 A::S::operator int() { return 1; }
89 // FIXME: It'd be nice to give more consistent diagnostics for these cases
90 // (but they're all failing for somewhat different reasons...).
91 template<typename
> struct A
;
92 template<typename T
> A
<T
>::A() {} // expected-error {{incomplete type 'A' named in nested name specifier}}
93 /*FIXME: needed to recover properly from previous error*/;
94 template<typename
> struct B
;
95 template<typename T
> void B
<T
>::f() {} // expected-error {{out-of-line definition of 'f' from class 'B<type-parameter-0-0>'}}
96 template<typename
> struct C
; // expected-note {{non-type declaration found}}
97 template<typename T
> C
<T
>::~C() {} // expected-error {{identifier 'C' after '~' in destructor name does not name a type}}