blob: 10520fb8bba460531e4847db412a41b04993df72 [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}}
Anders Carlssond1aa8002010-04-23 02:20:12 +00005 const int i; // expected-note {{declared here}} \
Douglas Gregor325e5932010-04-15 00:00:53 +00006 // 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}