blob: 4f9dd2b79d62b6acee088472a773251a7f013f7d [file] [log] [blame]
Douglas Gregorb48fe382008-10-31 09:07:45 +00001// RUN: clang -fsyntax-only -verify %s
2
3class Foo {
4 Foo();
5 (Foo)(float) { }
6 explicit Foo(int);
7 Foo(const Foo&);
8
9 static Foo(short, short); // expected-error{{constructor cannot be declared 'static'}}
10 virtual Foo(double); // expected-error{{constructor cannot be declared 'virtual'}}
11 Foo(long) const; // expected-error{{'const' qualifier is not allowed on a constructor}}
12
13 int Foo(int, int); // expected-error{{constructor cannot have a return type}}
14};