From: Kirill Bobyrev Date: Sun, 4 Sep 2016 22:28:39 +0000 (+0000) Subject: [clang-rename] add failing test X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9504e3a4f04612d76bcd77012221293c21f31bd6;p=platform%2Fupstream%2Fllvm.git [clang-rename] add failing test For some reason clang-rename fails to rename method of templated class. Add XFAIL test reproducing the issue. llvm-svn: 280639 --- diff --git a/clang-tools-extra/test/clang-rename/TemplatedClassFunction.cpp b/clang-tools-extra/test/clang-rename/TemplatedClassFunction.cpp new file mode 100644 index 0000000..1f5b0b52b --- /dev/null +++ b/clang-tools-extra/test/clang-rename/TemplatedClassFunction.cpp @@ -0,0 +1,22 @@ +template +class A { +public: + void foo() /* Test 1 */ {} // CHECK: void bar() /* Test 1 */ {} +}; + +int main(int argc, char **argv) { + A a; + a.foo(); /* Test 2 */ // CHECK: a.bar() /* Test 2 */ + return 0; +} + +// Test 1. +// RUN: clang-refactor rename -offset=48 -new-name=bar %s -- | sed 's,//.*,,' | FileCheck %s +// Test 2. +// RUN: clang-refactor rename -offset=162 -new-name=bar %s -- | sed 's,//.*,,' | FileCheck %s +// +// Currently unsupported test. +// XFAIL: * + +// To find offsets after modifying the file, use: +// grep -Ubo 'foo.*'