blob: 086f55736cb72f622bf618f3cb76f2f1dfeeee31 [file] [log] [blame]
Kirill Bobyrev77f522c2016-08-10 13:28:30 +00001class Foo /* Test 1 */ { // CHECK: class Bar /* Test 1 */ {
2public:
3 void foo(int x);
4};
Kirill Bobyrevee99fd12016-07-15 12:22:38 +00005
Kirill Bobyrev77f522c2016-08-10 13:28:30 +00006void Foo::foo(int x) /* Test 2 */ {} // CHECK: void Bar::foo(int x) /* Test 2 */ {}
Kirill Bobyrevee99fd12016-07-15 12:22:38 +00007
Kirill Bobyrev77f522c2016-08-10 13:28:30 +00008// Test 1.
9// RUN: clang-rename -offset=6 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s
10// Test 2.
11// RUN: clang-rename -offset=109 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s
Kirill Bobyrevee99fd12016-07-15 12:22:38 +000012
Kirill Bobyrev77f522c2016-08-10 13:28:30 +000013// To find offsets after modifying the file, use:
14// grep -Ubo 'Foo.*' <file>