summaryrefslogtreecommitdiffstats
path: root/clang/test/clang-rename/Ctor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/clang-rename/Ctor.cpp')
-rw-r--r--clang/test/clang-rename/Ctor.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/clang-rename/Ctor.cpp b/clang/test/clang-rename/Ctor.cpp
new file mode 100644
index 00000000000..9908a4123dd
--- /dev/null
+++ b/clang/test/clang-rename/Ctor.cpp
@@ -0,0 +1,14 @@
+class Foo { // CHECK: class Bar {
+public:
+ Foo(); /* Test 1 */ // CHECK: Bar();
+};
+
+Foo::Foo() /* Test 2 */ {} // CHECK: Bar::Bar() /* Test 2 */ {}
+
+// Test 1.
+// RUN: clang-rename -offset=62 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s
+// Test 2.
+// RUN: clang-rename -offset=116 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s
+
+// To find offsets after modifying the file, use:
+// grep -Ubo 'Foo.*' <file>
OpenPOWER on IntegriCloud