summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/PR5050-constructor-conversion.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-09-25 18:11:25 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-09-25 18:11:25 +0000
commit7498e50aea92276fdd8aceb7076b4156ee6dbab4 (patch)
treeaa3efbbcdd07958c35261e57650311e036baf4be /test/CodeGenCXX/PR5050-constructor-conversion.cpp
parentbcdc0f0aff015b6507560f50c71d1b7b6c6a9932 (diff)
Fix the AST tree so ir-gen can do the conversion via copy construction.
Fixed pr5050. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82783 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/PR5050-constructor-conversion.cpp')
-rw-r--r--test/CodeGenCXX/PR5050-constructor-conversion.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/CodeGenCXX/PR5050-constructor-conversion.cpp b/test/CodeGenCXX/PR5050-constructor-conversion.cpp
new file mode 100644
index 0000000000..adfe74ffbc
--- /dev/null
+++ b/test/CodeGenCXX/PR5050-constructor-conversion.cpp
@@ -0,0 +1,19 @@
+// RUN: clang-cc -triple x86_64-apple-darwin -std=c++0x -S %s -o %t-64.s &&
+// RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s &&
+// RUN: clang-cc -triple i386-apple-darwin -std=c++0x -S %s -o %t-32.s &&
+// RUN: FileCheck -check-prefix LP32 --input-file=%t-32.s %s &&
+// RUN: true
+
+struct A { A(const A&); };
+
+struct B : A { };
+
+A f(const B &b) {
+ return b;
+}
+
+// CHECK-LP64: call __ZN1AC1ERK1A
+
+// CHECK-LP32: call L__ZN1AC1ERK1A
+
+