From 1569ce68681d909594d64f9b056d71f5dd7563bf Mon Sep 17 00:00:00 2001 From: Roman Divacky Date: Tue, 1 Dec 2009 11:08:04 +0000 Subject: Update clang to r90226. --- test/CodeGenCXX/member-templates.cpp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 test/CodeGenCXX/member-templates.cpp (limited to 'test/CodeGenCXX/member-templates.cpp') diff --git a/test/CodeGenCXX/member-templates.cpp b/test/CodeGenCXX/member-templates.cpp new file mode 100644 index 000000000000..c8494c42cef9 --- /dev/null +++ b/test/CodeGenCXX/member-templates.cpp @@ -0,0 +1,31 @@ +// RUN: clang-cc %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s + +// CHECK: ; ModuleID +struct A { + template + A(T); +}; + +template A::A(T) {} + +struct B { + template + B(T); +}; + +template B::B(T) {} + +// CHECK: define void @_ZN1BC1IiEET_(%struct.B* %this, i32) +// CHECK: define void @_ZN1BC2IiEET_(%struct.B* %this, i32) +template B::B(int); + +template +struct C { + void f() { + int a[] = { 1, 2, 3 }; + } +}; + +void f(C& c) { + c.f(); +} -- cgit v1.3