Make member initializers for union members work correctly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88989 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenCXX/member-init-union.cpp b/test/CodeGenCXX/member-init-union.cpp
new file mode 100644
index 0000000..334d5fd
--- /dev/null
+++ b/test/CodeGenCXX/member-init-union.cpp
@@ -0,0 +1,10 @@
+// RUN: clang-cc %s -emit-llvm-only -verify
+
+union x {
+ int a;
+ float b;
+ x(float y) : b(y) {}
+ x(int y) : a(y) {}
+};
+x a(1), b(1.0f);
+