Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CXX / class / class.base / class.base.init / p5-0x.cpp
blobe9aa6da7dc7b95075680d585bf4106ad0ff436da
1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
3 // [class.base.init]p5
4 // A ctor-initializer may initialize a variant member of the constructor’s
5 // class. If a ctor-initializer specifies more than one mem-initializer for the
6 // same member or for the same base class, the ctor-initializer is ill-formed.
8 union E {
9 int a;
10 int b;
11 E() : a(1), // expected-note{{previous initialization is here}}
12 b(2) { // expected-error{{initializing multiple members of union}}
16 union F {
17 struct {
18 int a;
19 int b;
21 int c;
22 F() : a(1), // expected-note{{previous initialization is here}}
23 b(2),
24 c(3) { // expected-error{{initializing multiple members of union}}