opnsense-src/test/SemaCXX/value-initialization.cpp

11 lines
337 B
C++
Raw Normal View History

2010-01-01 05:34:51 -05:00
// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x
2009-11-04 10:04:32 -05:00
2009-11-18 09:59:57 -05:00
struct A { // expected-error {{implicit default constructor for 'struct A' must explicitly initialize the const member 'i'}}
2009-11-04 10:04:32 -05:00
const int i; // expected-note {{declared at}}
virtual void f() { }
};
int main () {
2009-11-18 09:59:57 -05:00
(void)A(); // expected-note {{first required here}}
2009-11-04 10:04:32 -05:00
}