Home | History | Annotate | Download | only in CodeGenCXX
      1 // RUN: %clang_cc1 %s -emit-llvm -triple %itanium_abi_triple -o - | FileCheck %s
      2 template <typename T> void f(T) {}
      3 template <typename T> void f() { }
      4 
      5 void test() {
      6   // CHECK: @_Z1fIiEvT_
      7   void (*p)(int) = &f;
      8 
      9   // CHECK: @_Z1fIiEvv
     10   void (*p2)() = f<int>;
     11 }
     12 // CHECK-LABEL: define linkonce_odr {{.*}}void @_Z1fIiEvT_
     13 // CHECK-LABEL: define linkonce_odr {{.*}}void @_Z1fIiEvv
     14 
     15 namespace PR6973 {
     16   template<typename T>
     17   struct X {
     18     void f(const T&);
     19   };
     20 
     21   template<typename T>
     22   int g();
     23 
     24   void h(X<int (*)()> xf) {
     25     xf.f(&g<int>);
     26   }
     27 }
     28