| 1 |
class Foo /* Test 1 */ {}; // CHECK: class Bar /* Test 1 */ {}; |
| 2 |
|
| 3 |
template <typename T> |
| 4 |
void func() {} |
| 5 |
|
| 6 |
template <typename T> |
| 7 |
class Baz {}; |
| 8 |
|
| 9 |
int main() { |
| 10 |
func<Foo>(); // CHECK: func<Bar>(); |
| 11 |
Baz<Foo> /* Test 2 */ obj; // CHECK: Baz<Bar> /* Test 2 */ obj; |
| 12 |
return 0; |
| 13 |
} |
| 14 |
|
| 15 |
// Test 1. |
| 16 |
// RUN: clang-rename -offset=7 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s |
| 17 |
// Test 2. |
| 18 |
// RUN: clang-rename -offset=215 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s |
| 19 |
|
| 20 |
// To find offsets after modifying the file, use: |
| 21 |
// grep -Ubo 'Foo.*' <file> |