From 26623cb13ebeb213383ef6b6e98dade553cc40f7 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Wed, 24 Feb 2010 21:54:27 +0000 Subject: [PATCH] Add test case for PR6141, which was fixed a few days ago llvm-svn: 97063 --- clang/test/CXX/special/class.copy/p3.cpp | 27 ++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 clang/test/CXX/special/class.copy/p3.cpp diff --git a/clang/test/CXX/special/class.copy/p3.cpp b/clang/test/CXX/special/class.copy/p3.cpp new file mode 100644 index 000000000000..3d87266ef327 --- /dev/null +++ b/clang/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 +struct X { + X(); + template X(X); + X(const X&); +}; + +void f(X) { } + +struct Y : X { }; +struct Z : X { }; + +// 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()); +} -- GitLab