summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-rename/NoNewName.cpp
blob: a706f4263e12fd0bc720056843b74c9a515c9c0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// This test is a copy of ConstCastExpr.cpp with a single change:
// -new-name hasn't been passed to clang-rename, so this test should give an
// error.
// RUN: not clang-rename -offset=133 %s 2>&1 | FileCheck %s
// CHECK: clang-rename: no new name provided.

class Cla {
public:
  int getValue() {
    return 0;
  }
};

int main() {
  const Cla *C = new Cla();
  const_cast<Cla *>(C)->getValue();
}

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