Kirill Bobyrev | ee99fd1 | 2016-07-15 12:22:38 +0000 | [diff] [blame] | 1 | class Baz {}; |
| 2 | |
| 3 | class Qux { |
Kirill Bobyrev | 77f522c | 2016-08-10 13:28:30 +0000 | [diff] [blame] | 4 | Baz Foo; /* Test 1 */ // CHECK: Baz Bar; |
Kirill Bobyrev | ee99fd1 | 2016-07-15 12:22:38 +0000 | [diff] [blame] | 5 | public: |
| 6 | Qux(); |
| 7 | }; |
| 8 | |
Kirill Bobyrev | 77f522c | 2016-08-10 13:28:30 +0000 | [diff] [blame] | 9 | Qux::Qux() : Foo() /* Test 2 */ {} // CHECK: Qux::Qux() : Bar() /* Test 2 */ {} |
Kirill Bobyrev | ee99fd1 | 2016-07-15 12:22:38 +0000 | [diff] [blame] | 10 | |
Kirill Bobyrev | 77f522c | 2016-08-10 13:28:30 +0000 | [diff] [blame] | 11 | // Test 1. |
| 12 | // RUN: clang-rename -offset=33 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s |
| 13 | // Test 2. |
| 14 | // RUN: clang-rename -offset=118 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s |
| 15 | |
| 16 | // To find offsets after modifying the file, use: |
| 17 | // grep -Ubo 'Foo.*' <file> |