Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / clang-rename / TemplatedClassFunction.cpp
blobd7f21e0847c97af7748f70f0a8d74ffbe95a0c1a
1 template <typename T>
2 class A {
3 public:
4 void foo() /* Test 1 */ {} // CHECK: void bar() /* Test 1 */ {}
5 };
7 int main(int argc, char **argv) {
8 A<int> a;
9 A<double> b;
10 A<float> c;
11 a.foo(); /* Test 2 */ // CHECK: a.bar(); /* Test 2 */
12 b.foo(); /* Test 3 */ // CHECK: b.bar(); /* Test 3 */
13 c.foo(); /* Test 4 */ // CHECK: c.bar(); /* Test 4 */
14 return 0;
17 // Test 1.
18 // RUN: clang-rename -offset=48 -new-name=bar %s -- | sed 's,//.*,,' | FileCheck %s
19 // Test 2.
20 // RUN: clang-rename -offset=191 -new-name=bar %s -- | sed 's,//.*,,' | FileCheck %s
21 // Test 3.
22 // RUN: clang-rename -offset=255 -new-name=bar %s -- | sed 's,//.*,,' | FileCheck %s
23 // Test 4.
24 // RUN: clang-rename -offset=319 -new-name=bar %s -- | sed 's,//.*,,' | FileCheck %s
26 // To find offsets after modifying the file, use:
27 // grep -Ubo 'foo.*' <file>