2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x
|
2009-10-28 00:51:19 +08:00
|
|
|
|
2010-04-15 08:00:53 +08:00
|
|
|
struct A { // expected-error {{implicit default constructor for 'A' must explicitly initialize the const member 'i'}} \
|
|
|
|
// expected-warning{{struct 'A' does not declare any constructor to initialize its non-modifiable members}}
|
2010-04-23 10:20:12 +08:00
|
|
|
const int i; // expected-note {{declared here}} \
|
2010-04-15 08:00:53 +08:00
|
|
|
// expected-note{{const member 'i' will never be initialized}}
|
2009-11-04 04:38:53 +08:00
|
|
|
virtual void f() { }
|
2009-10-28 00:51:19 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
int main () {
|
2009-11-10 03:20:36 +08:00
|
|
|
(void)A(); // expected-note {{first required here}}
|
2009-10-28 00:51:19 +08:00
|
|
|
}
|