diff options
author | John McCall <rjmccall@apple.com> | 2010-04-30 05:56:45 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-04-30 05:56:45 +0000 |
commit | c743571e24c864b5930ef1290d71b03ccfde80a1 (patch) | |
tree | 5505db67dbe5a8e133c932ad64b195a141c59db7 /test/CodeGenCXX/constructors.cpp | |
parent | 9ffce2182e4fe72052d620698d272207f494b1cf (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102692 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/constructors.cpp')
-rw-r--r-- | test/CodeGenCXX/constructors.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGenCXX/constructors.cpp b/test/CodeGenCXX/constructors.cpp index e0709055cd..a8dc7fcec7 100644 --- a/test/CodeGenCXX/constructors.cpp +++ b/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; + } +} |