Douglas Gregor | b48fe38 | 2008-10-31 09:07:45 +0000 | [diff] [blame^] | 1 | // RUN: clang -fsyntax-only -verify %s |
| 2 | |
| 3 | class 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 | }; |