diff options
Diffstat (limited to 'clang-tools-extra/test/clang-rename/CtorInitializer.cpp')
-rw-r--r-- | clang-tools-extra/test/clang-rename/CtorInitializer.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/clang-tools-extra/test/clang-rename/CtorInitializer.cpp b/clang-tools-extra/test/clang-rename/CtorInitializer.cpp new file mode 100644 index 00000000000..1fa16657950 --- /dev/null +++ b/clang-tools-extra/test/clang-rename/CtorInitializer.cpp @@ -0,0 +1,16 @@ +// RUN: cat %s > %t.cpp +// RUN: clang-rename -offset=163 -new-name=Bar %t.cpp -i -- +// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s + +class Baz {}; + +class Qux { + Baz Foo; // CHECK: Baz Bar; +public: + Qux(); +}; + +Qux::Qux() : Foo() {} // CHECK: Qux::Qux() : Bar() {} + +// Use grep -FUbo 'Foo' <file> to get the correct offset of foo when changing +// this file. |