aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-02-24 21:54:27 +0000
committerDouglas Gregor <dgregor@apple.com>2010-02-24 21:54:27 +0000
commiteba9acec3780d49acfd32447b1f20d7c366b0959 (patch)
treea010c0154dd0572791917979b51c6ca588339f2c
parent5821249f8f95f7c3c059f3135baa98e7b9d9e1fc (diff)
Add test case for PR6141, which was fixed a few days ago
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97063 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/CXX/special/class.copy/p3.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/CXX/special/class.copy/p3.cpp b/test/CXX/special/class.copy/p3.cpp
new file mode 100644
index 0000000000..3d87266ef3
--- /dev/null
+++ b/test/CXX/special/class.copy/p3.cpp
@@ -0,0 +1,27 @@
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
+
+// PR6141
+template<typename T>
+struct X {
+ X();
+ template<typename U> X(X<U>);
+ X(const X<T>&);
+};
+
+void f(X<int>) { }
+
+struct Y : X<int> { };
+struct Z : X<float> { };
+
+// CHECK: define i32 @main()
+int main() {
+ // CHECK: call void @_ZN1YC1Ev
+ // CHECK: call void @_ZN1XIiEC1ERKS0_
+ // CHECK: call void @_Z1f1XIiE
+ f(Y());
+ // CHECK: call void @_ZN1ZC1Ev
+ // CHECK: call void @_ZN1XIfEC1ERKS0_
+ // CHECK: call void @_ZN1XIiEC1IfEES_IT_E
+ // CHECK: call void @_Z1f1XIiE
+ f(Z());
+}