1 template <typename T, int U>
2 bool Foo = true;  // CHECK: bool Bar = true;
3 
4 // explicit template specialization
5 template <>
6 bool Foo<int, 0> = false; // CHECK: bool Bar<int, 0> = false;
7 
8 // partial template specialization
9 template <typename T>
10 bool Foo<T, 1> = false; // bool Bar<x, 1> = false;
11 
k()12 void k() {
13   // ref to the explicit template specialization
14   Foo<int, 0>;   // CHECK: Bar<int, 0>;
15   // ref to the primary template.
16   Foo<double, 2>;   // CHECK: Bar<double, 2>;
17 }
18 
19 
20 // Test 1.
21 // RUN: clang-rename -offset=34 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s
22 // Test 2.
23 // RUN: clang-rename -offset=128 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s
24 // Test 3.
25 // RUN: clang-rename -offset=248 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s
26 // Test 4.
27 // RUN: clang-rename -offset=357 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s
28 // Test 5.
29 // RUN: clang-rename -offset=431 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s
30 
31 // To find offsets after modifying the file, use:
32 //   grep -Ubo 'Foo.*' <file>
33