summaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/constructor-template.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-09-01 21:04:42 +0000
committerDouglas Gregor <dgregor@apple.com>2009-09-01 21:04:42 +0000
commit72f6d678c8de9f3a770e8ae5fc4979abf3940668 (patch)
tree8703932666cbdbe3fb8c5c09abc24ea8d3b3d010 /test/CodeGenCXX/constructor-template.cpp
parentcb3c308ef0e63b2902911b985517309c26f975dc (diff)
downloadclang-72f6d678c8de9f3a770e8ae5fc4979abf3940668.tar.gz
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
Diffstat (limited to 'test/CodeGenCXX/constructor-template.cpp')
-rw-r--r--test/CodeGenCXX/constructor-template.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CodeGenCXX/constructor-template.cpp b/test/CodeGenCXX/constructor-template.cpp
new file mode 100644
index 0000000000..10577e9766
--- /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);
+}