Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x |
Fariborz Jahanian | 6c813e1 | 2009-10-27 16:51:19 +0000 | [diff] [blame] | 2 | |
John McCall | 7c2342d | 2010-03-10 11:27:22 +0000 | [diff] [blame] | 3 | struct A { // expected-error {{implicit default constructor for 'A' must explicitly initialize the const member 'i'}} |
Fariborz Jahanian | 6f26920 | 2009-11-03 20:38:53 +0000 | [diff] [blame] | 4 | const int i; // expected-note {{declared at}} |
| 5 | virtual void f() { } |
Fariborz Jahanian | 6c813e1 | 2009-10-27 16:51:19 +0000 | [diff] [blame] | 6 | }; |
| 7 | |
| 8 | int main () { |
Eli Friedman | 80c30da | 2009-11-09 19:20:36 +0000 | [diff] [blame] | 9 | (void)A(); // expected-note {{first required here}} |
Fariborz Jahanian | 6c813e1 | 2009-10-27 16:51:19 +0000 | [diff] [blame] | 10 | } |