diff options
author | Anders Carlsson <andersca@mac.com> | 2009-11-24 21:08:10 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-11-24 21:08:10 +0000 |
commit | 3c9beab48a6af525b851bfc44b55ddb2b35c5237 (patch) | |
tree | 18344234f5f8f0b3ab87af80a64ec98351a5653f /clang/test/CodeGenCXX/copy-constructor-synthesis.cpp | |
parent | 45b1a47a9cf7bda4dcee3b382f8069ca13ef08b6 (diff) | |
download | bcm5719-llvm-3c9beab48a6af525b851bfc44b55ddb2b35c5237.tar.gz bcm5719-llvm-3c9beab48a6af525b851bfc44b55ddb2b35c5237.zip |
Handle references correctly when synthesizing copy constructors.
With this change, the clang-on-clang test result is now
Expected Passes : 224
Unexpected Failures: 37
Which means that we can compile over 80% of clang with clang! :)
llvm-svn: 89799
Diffstat (limited to 'clang/test/CodeGenCXX/copy-constructor-synthesis.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/copy-constructor-synthesis.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/copy-constructor-synthesis.cpp b/clang/test/CodeGenCXX/copy-constructor-synthesis.cpp index 3b8f7821abc..2e950eb9e9b 100644 --- a/clang/test/CodeGenCXX/copy-constructor-synthesis.cpp +++ b/clang/test/CodeGenCXX/copy-constructor-synthesis.cpp @@ -102,6 +102,17 @@ int main() { m1.pr(); } +struct A { +}; + +struct B : A { + A &a; +}; + +void f(const B &b1) { + B b2(b1); +} + // CHECK-LP64: .globl __ZN1XC1ERKS_ // CHECK-LP64: .weak_definition __ZN1XC1ERKS_ // CHECK-LP64: __ZN1XC1ERKS_: |