blob: 29d866fa64de1c3f013a755290af80db81a9d64f [file] [log] [blame]
Fariborz Jahanian6c813e12009-10-27 16:51:19 +00001// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x
2
3struct A {
Fariborz Jahanian6f269202009-11-03 20:38:53 +00004 const int i; // expected-note {{declared at}}
5 virtual void f() { }
Fariborz Jahanian6c813e12009-10-27 16:51:19 +00006};
7
8int main () {
Fariborz Jahanian6f269202009-11-03 20:38:53 +00009 (void)A(); // expected-error {{cannot define the implicit default constructor for 'struct A', because const member 'i' cannot be default-initialized}}
Fariborz Jahanian6c813e12009-10-27 16:51:19 +000010}