summaryrefslogtreecommitdiff
path: root/clang/test/CodeGenCXX/template-anonymous-union-member-initializer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGenCXX/template-anonymous-union-member-initializer.cpp')
-rw-r--r--clang/test/CodeGenCXX/template-anonymous-union-member-initializer.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/template-anonymous-union-member-initializer.cpp b/clang/test/CodeGenCXX/template-anonymous-union-member-initializer.cpp
new file mode 100644
index 0000000..41ae084
--- /dev/null
+++ b/clang/test/CodeGenCXX/template-anonymous-union-member-initializer.cpp
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 -emit-llvm -o %t %s
+template <typename T>
+class A
+{
+ union { void *d; };
+
+public:
+ A() : d(0) { }
+};
+
+A<int> a0;