aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/anonymous-union-member-initializer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenCXX/anonymous-union-member-initializer.cpp')
-rw-r--r--test/CodeGenCXX/anonymous-union-member-initializer.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGenCXX/anonymous-union-member-initializer.cpp b/test/CodeGenCXX/anonymous-union-member-initializer.cpp
new file mode 100644
index 000000000000..2030f4053c90
--- /dev/null
+++ b/test/CodeGenCXX/anonymous-union-member-initializer.cpp
@@ -0,0 +1,12 @@
+// RUN: clang-cc -emit-llvm -o - %s
+
+struct A {
+ union {
+ int a;
+ void* b;
+ };
+
+ A() : a(0) { }
+};
+
+A a;