Clang Project

clang_source_code/test/clang-rename/CtorInitializer.cpp
1class Baz {};
2
3class Qux {
4  Baz Foo;         /* Test 1 */       // CHECK: Baz Bar;
5public:
6  Qux();
7};
8
9Qux::Qux() : Foo() /* Test 2 */ {}    // CHECK: Qux::Qux() : Bar() /* Test 2 */ {}
10
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>
18