summaryrefslogtreecommitdiff
path: root/test/clang-rename/Ctor.cpp
blob: 9908a4123ddfc05ae8a91d76bdd15345830e59b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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>