commit | 0ae287a498b8cec2086fe6b7e753cbb3df63e74a | [log] [tgz] |
---|---|---|
author | John McCall <rjmccall@apple.com> | Wed Dec 01 04:43:34 2010 +0000 |
committer | John McCall <rjmccall@apple.com> | Wed Dec 01 04:43:34 2010 +0000 |
tree | 22c868a442c3e824b29d555680ef1f86e13b5ee3 | |
parent | bb3f9952842f4efa663303b0fd1e23a04a0ad082 [diff] [blame] |
Restore the lvalue-to-rvalue conversion patch with a minimal fix. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120555 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenCXX/derived-to-base.cpp b/test/CodeGenCXX/derived-to-base.cpp index e44fdc5..76b79fc 100644 --- a/test/CodeGenCXX/derived-to-base.cpp +++ b/test/CodeGenCXX/derived-to-base.cpp
@@ -34,3 +34,14 @@ } +// Don't crash on a derived-to-base conversion of an r-value +// aggregate. +namespace test3 { + struct A {}; + struct B : A {}; + + void foo(A a); + void test() { + foo(B()); + } +}