[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang / test / clang-rename / VariableTemplate.cpp
bloba345ede5a7f6ad2cb74b70596d21572ff442ff8c
1 template <typename T, int U>
2 bool Foo = true; // CHECK: bool Bar = true;
4 // explicit template specialization
5 template <>
6 bool Foo<int, 0> = false; // CHECK: bool Bar<int, 0> = false;
8 // partial template specialization
9 template <typename T>
10 bool Foo<T, 1> = false; // bool Bar<x, 1> = false;
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>;
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
31 // To find offsets after modifying the file, use:
32 // grep -Ubo 'Foo.*' <file>