summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/constructors.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-04-30 05:56:45 +0000
committerJohn McCall <rjmccall@apple.com>2010-04-30 05:56:45 +0000
commitb3cec96a7c03b682f7ff836f366b2b1f0fb9cfb0 (patch)
tree8aba94d3dc1b0959d70883f3ad3aa13b82077364 /clang/test/CodeGenCXX/constructors.cpp
parent1e13c5a8fb9c9fbf24e90a86cc1e745fce0eac22 (diff)
downloadbcm5719-llvm-b3cec96a7c03b682f7ff836f366b2b1f0fb9cfb0.tar.gz
bcm5719-llvm-b3cec96a7c03b682f7ff836f366b2b1f0fb9cfb0.zip
Account for the VTT argument when making an implicit copy constructor for
a class with virtual bases. Just a patch until Sema starts (correctly) doing most of this analysis. Fixes PR 6622. llvm-svn: 102692
Diffstat (limited to 'clang/test/CodeGenCXX/constructors.cpp')
-rw-r--r--clang/test/CodeGenCXX/constructors.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/constructors.cpp b/clang/test/CodeGenCXX/constructors.cpp
index e0709055cdb..a8dc7fcec70 100644
--- a/clang/test/CodeGenCXX/constructors.cpp
+++ b/clang/test/CodeGenCXX/constructors.cpp
@@ -92,3 +92,15 @@ D::D(int x, ...) : A(ValueClass(x, x+1)), mem(x*x) {}
// CHECK: call void @_ZN10ValueClassC1Eii(
// CHECK: call void @_ZN1AC2E10ValueClass(
// CHECK: call void @_ZN6MemberC1Ei(
+
+
+// PR6622: this shouldn't crash
+namespace test0 {
+ struct A {};
+ struct B : virtual A { int x; };
+ struct C : B {};
+
+ void test(C &in) {
+ C tmp = in;
+ }
+}
OpenPOWER on IntegriCloud