In CXXBaseOrMemberInitializer, don't confuse CtorTocall with
AnonUnionMember. Fixes PR4826.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80721 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenCXX/constructor-template.cpp b/test/CodeGenCXX/constructor-template.cpp
new file mode 100644
index 0000000..10577e9
--- /dev/null
+++ b/test/CodeGenCXX/constructor-template.cpp
@@ -0,0 +1,18 @@
+// RUN: clang-cc %s -emit-llvm -o -
+
+// PR4826
+struct A {
+  A() {
+  }
+};
+
+template<typename T>
+struct B {
+  B(T) {}
+  
+  A nodes;
+};
+
+int main() {
+  B<int> *n = new B<int>(4);
+}