Sean Hunt | 9ae60d5 | 2011-05-26 01:26:05 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
Sean Hunt | 0a62984 | 2011-06-03 18:05:29 +0000 | [diff] [blame] | 2 | // RUN: %clang_cc1 -Wno-default-arg-special-member -Werror -fsyntax-only %s |
Sean Hunt | 9ae60d5 | 2011-05-26 01:26:05 +0000 | [diff] [blame] | 3 | |
| 4 | class foo { |
| 5 | foo(foo&, int); // expected-note {{was not a special member function}} |
| 6 | foo(int); // expected-note {{was not a special member function}} |
| 7 | foo(const foo&); // expected-note {{was a copy constructor}} |
| 8 | }; |
| 9 | |
| 10 | foo::foo(foo&, int = 0) { } // expected-warning {{makes this constructor a copy constructor}} |
| 11 | foo::foo(int = 0) { } // expected-warning {{makes this constructor a default constructor}} |
| 12 | foo::foo(const foo& = 0) { } //expected-warning {{makes this constructor a default constructor}} |