// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -o - %s | FileCheck %s template void f(T) { /* ... */ } template inline void g(T) { /* ... */ } // CHECK: define void @_Z1gIiEvT_ template<> void g<>(int) { /* ... */ } template struct X { void f() { } void g(); void h(); }; template void X::g() { } template inline void X::h() { } // CHECK: define void @_ZN1XIiE1fEv template<> void X::f() { } // CHECK: define void @_ZN1XIiE1hEv template<> void X::h() { } // CHECK: define linkonce_odr void @_Z1fIiEvT_ template<> inline void f<>(int) { /* ... */ } // CHECK: define linkonce_odr void @_ZN1XIiE1gEv template<> inline void X::g() { } void test(X xi) { f(17); g(17); xi.f(); xi.g(); xi.h(); }