Clang Project

clang_source_code/test/clang-rename/ClassSimpleRenaming.cpp
1class Foo /* Test 1 */ {              // CHECK: class Bar /* Test 1 */ {
2public:
3  void foo(int x);
4};
5
6void Foo::foo(int x) /* Test 2 */ {}  // CHECK: void Bar::foo(int x) /* Test 2 */ {}
7
8// 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
12
13// To find offsets after modifying the file, use:
14//   grep -Ubo 'Foo.*' <file>
15