Home | History | Annotate | Download | only in CodeGenCXX
      1 // RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
      2 template<typename T, typename U>
      3 T* next(T* ptr, const U& diff);
      4 
      5 template<typename T, typename U>
      6 T* next(T* ptr, const U& diff) {
      7   return ptr + diff;
      8 }
      9 
     10 void test(int *iptr, float *fptr, int diff) {
     11   // CHECK: _Z4nextIiiEPT_S1_RKT0_
     12   iptr = next(iptr, diff);
     13 
     14   // CHECK: _Z4nextIfiEPT_S1_RKT0_
     15   fptr = next(fptr, diff);
     16 }
     17 
     18 template<typename T, typename U>
     19 T* next(T* ptr, const U& diff);
     20 
     21 void test2(int *iptr, double *dptr, int diff) {
     22   iptr = next(iptr, diff);
     23 
     24   // CHECK: _Z4nextIdiEPT_S1_RKT0_
     25   dptr = next(dptr, diff);
     26 }
     27