1 // RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple %s -o - | FileCheck %s
3 // CHECK-DAG: _ZZN7PR219047GetDataIiEERKibE1i = internal global i32 4
4 // CHECK-DAG: _ZZN7PR219047GetDataIiEERKibE1i_0 = internal global i32 2
6 template<typename T
, typename U
>
7 T
* next(T
* ptr
, const U
& diff
);
9 template<typename T
, typename U
>
10 T
* next(T
* ptr
, const U
& diff
) {
14 void test(int *iptr
, float *fptr
, int diff
) {
15 // CHECK: _Z4nextIiiEPT_S1_RKT0_
16 iptr
= next(iptr
, diff
);
18 // CHECK: _Z4nextIfiEPT_S1_RKT0_
19 fptr
= next(fptr
, diff
);
22 template<typename T
, typename U
>
23 T
* next(T
* ptr
, const U
& diff
);
25 void test2(int *iptr
, double *dptr
, int diff
) {
26 iptr
= next(iptr
, diff
);
28 // CHECK: _Z4nextIdiEPT_S1_RKT0_
29 dptr
= next(dptr
, diff
);
34 const int &GetData(bool);
37 const int &GetData
<int>(bool b
) {