xref: /aosp_15_r20/external/clang/test/CodeGenCXX/member-init-union.cpp (revision 67e74705e28f6214e480b399dd47ea732279e315)
1 // RUN: %clang_cc1 %s -emit-llvm-only -verify
2 // expected-no-diagnostics
3 
4 union x {
5   int a;
6   float b;
x(float y)7   x(float y) : b(y) {}
x(int y)8   x(int y) : a(y) {}
9 };
10 x a(1), b(1.0f);
11 
12