summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/value-initialization.cpp
blob: 29d866fa64de1c3f013a755290af80db81a9d64f (plain)
1
2
3
4
5
6
7
8
9
10
// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x

struct A {
     const int i;	// expected-note {{declared at}}
     virtual void f() { } 
};

int main () {
      (void)A();	// expected-error {{cannot define the implicit default constructor for 'struct A', because const member 'i' cannot be default-initialized}}
}
OpenPOWER on IntegriCloud