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