llvm-for-llvmta/tools/clang/test/CXX/class/class.union/class.union.anon/p4.cpp

11 lines
285 B
C++
Raw Permalink Normal View History

2022-04-25 13:02:35 +02:00
// RUN: %clang_cc1 -std=c++11 -verify %s
union U {
int x = 0; // expected-note {{previous initialization is here}}
union {}; // expected-warning {{does not declare anything}}
union {
int z;
int y = 1; // expected-error {{initializing multiple members of union}}
};
};