1f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s 2f4a2713aSLionel Sambuc 3f4a2713aSLionel Sambuc // CHECK: ; ModuleID 4f4a2713aSLionel Sambuc struct A { 5f4a2713aSLionel Sambuc template<typename T> 6f4a2713aSLionel Sambuc A(T); 7f4a2713aSLionel Sambuc }; 8f4a2713aSLionel Sambuc A(T)9f4a2713aSLionel Sambuctemplate<typename T> A::A(T) {} 10f4a2713aSLionel Sambuc 11f4a2713aSLionel Sambuc struct B { 12f4a2713aSLionel Sambuc template<typename T> 13f4a2713aSLionel Sambuc B(T); 14f4a2713aSLionel Sambuc }; 15f4a2713aSLionel Sambuc B(T)16f4a2713aSLionel Sambuctemplate<typename T> B::B(T) {} 17f4a2713aSLionel Sambuc 18f4a2713aSLionel Sambuc // CHECK-LABEL: define weak_odr void @_ZN1BC2IiEET_(%struct.B* %this, i32) unnamed_addr 19*0a6a1f1dSLionel Sambuc // CHECK-LABEL: define weak_odr void @_ZN1BC1IiEET_(%struct.B* %this, i32) unnamed_addr 20f4a2713aSLionel Sambuc template B::B(int); 21f4a2713aSLionel Sambuc 22f4a2713aSLionel Sambuc template<typename T> 23f4a2713aSLionel Sambuc struct C { fC24f4a2713aSLionel Sambuc void f() { 25f4a2713aSLionel Sambuc int a[] = { 1, 2, 3 }; 26f4a2713aSLionel Sambuc } 27f4a2713aSLionel Sambuc }; 28f4a2713aSLionel Sambuc f(C<int> & c)29f4a2713aSLionel Sambucvoid f(C<int>& c) { 30f4a2713aSLionel Sambuc c.f(); 31f4a2713aSLionel Sambuc } 32