forked from OSchip/llvm-project
[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
This commit is contained in:
parent
b2e2c19978
commit
9504e3a4f0
|
@ -0,0 +1,22 @@
|
||||||
|
template <typename T>
|
||||||
|
class A {
|
||||||
|
public:
|
||||||
|
void foo() /* Test 1 */ {} // CHECK: void bar() /* Test 1 */ {}
|
||||||
|
};
|
||||||
|
|
||||||
|
int main(int argc, char **argv) {
|
||||||
|
A<int> 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.*' <file>
|
Loading…
Reference in New Issue