summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/copy-constructor-synthesis.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-11-24 21:08:10 +0000
committerAnders Carlsson <andersca@mac.com>2009-11-24 21:08:10 +0000
commit3c9beab48a6af525b851bfc44b55ddb2b35c5237 (patch)
tree18344234f5f8f0b3ab87af80a64ec98351a5653f /clang/test/CodeGenCXX/copy-constructor-synthesis.cpp
parent45b1a47a9cf7bda4dcee3b382f8069ca13ef08b6 (diff)
downloadbcm5719-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.cpp11
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_:
OpenPOWER on IntegriCloud