Daniel Dunbar | 8fbe78f | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x |
Fariborz Jahanian | 1156548 | 2009-10-27 16:51:19 +0000 | [diff] [blame] | 2 | |
John McCall | 85f9055 | 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 | 7ad3616 | 2009-11-03 20:38:53 +0000 | [diff] [blame] | 4 | const int i; // expected-note {{declared at}} |
| 5 | virtual void f() { } |
Fariborz Jahanian | 1156548 | 2009-10-27 16:51:19 +0000 | [diff] [blame] | 6 | }; |
| 7 | |
| 8 | int main () { |
Eli Friedman | 9cf6b59 | 2009-11-09 19:20:36 +0000 | [diff] [blame] | 9 | (void)A(); // expected-note {{first required here}} |
Fariborz Jahanian | 1156548 | 2009-10-27 16:51:19 +0000 | [diff] [blame] | 10 | } |