blob: 00bd1aaa40bd6efee572022d9a63f0c85ceff65f [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x
Fariborz Jahanian6c813e12009-10-27 16:51:19 +00002
Douglas Gregor325e5932010-04-15 00:00:53 +00003struct A { // expected-error {{implicit default constructor for 'A' must explicitly initialize the const member 'i'}} \
4 // expected-warning{{struct 'A' does not declare any constructor to initialize its non-modifiable members}}
5 const int i; // expected-note {{declared at}} \
6 // expected-note{{const member 'i' will never be initialized}}
Fariborz Jahanian6f269202009-11-03 20:38:53 +00007 virtual void f() { }
Fariborz Jahanian6c813e12009-10-27 16:51:19 +00008};
9
10int main () {
Eli Friedman80c30da2009-11-09 19:20:36 +000011 (void)A(); // expected-note {{first required here}}
Fariborz Jahanian6c813e12009-10-27 16:51:19 +000012}