[cfe-commits] r97063 - /cfe/trunk/test/CXX/special/class.copy/p3.cpp

Douglas Gregor dgregor at apple.com
Wed Feb 24 13:54:27 PST 2010


Author: dgregor
Date: Wed Feb 24 15:54:27 2010
New Revision: 97063

URL: http://llvm.org/viewvc/llvm-project?rev=97063&view=rev
Log:
Add test case for PR6141, which was fixed a few days ago

Added:
    cfe/trunk/test/CXX/special/class.copy/p3.cpp

Added: cfe/trunk/test/CXX/special/class.copy/p3.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/special/class.copy/p3.cpp?rev=97063&view=auto
==============================================================================
--- cfe/trunk/test/CXX/special/class.copy/p3.cpp (added)
+++ cfe/trunk/test/CXX/special/class.copy/p3.cpp Wed Feb 24 15:54:27 2010
@@ -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());
+}





More information about the cfe-commits mailing list