summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-rename/ConstCastExpr.cpp
blob: 7336a1621d9d41bea819dd519a7bd0beedf1b724 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// RUN: clang-rename -offset=74 -new-name=Bar %s -- | FileCheck %s

class Foo {                         // CHECK: class Bar {
public:
  int getValue() {
    return 0;
  }
};

int main() {
  const Foo *C = new Foo();         // CHECK: const Bar *C = new Bar();
  const_cast<Foo *>(C)->getValue(); // CHECK: const_cast<Bar *>(C)->getValue();
}

// Use grep -FUbo 'Foo' <file> to get the correct offset of Foo when changing
// this file.
OpenPOWER on IntegriCloud