summaryrefslogtreecommitdiffstats
path: root/test/clang-rename/TemplatedClassFunction.cpp
blob: 1f5b0b52ba7aa1bb4a89196a7a5606eb2c01c30b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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>