~pali/llvm/clang-tools-extra-3.9

« back to all changes in this revision

Viewing changes to test/clang-rename/VarTest.cpp

  • Committer: omtcyfz
  • Date: 2016-07-16 08:55:01 UTC
  • Revision ID: svn-v4:91177308-0d34-0410-b5e6-96231b3b80d8:clang-tools-extra/trunk:275681
[clang-rename] remove obsolete tests and apply fixes to existing

Few tests introduced by previous patch had obsolete counterparts.

Applied fixes to {Dynamic|Static}CastExpr.cpp

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// RUN: cat %s > %t.cpp
2
 
// RUN: clang-rename -offset=150 -new-name=hector %t.cpp -i --
3
 
// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
4
 
namespace A { int foo;  // CHECK: int hector;
5
 
}
6
 
int foo;  // CHECK: int foo;
7
 
int bar = foo; // CHECK: bar = foo;
8
 
int baz = A::foo; // CHECK: baz = A::hector;
9
 
void fun1() {
10
 
  struct {
11
 
    int foo; // CHECK: int foo;
12
 
  } b = { 100 };
13
 
  int foo = 100; // CHECK: int foo
14
 
  baz = foo; // CHECK: baz = foo;
15
 
  {
16
 
    extern int foo; // CHECK: int foo;
17
 
    baz = foo; // CHECK: baz = foo;
18
 
    foo = A::foo + baz; // CHECK: foo = A::hector + baz;
19
 
    A::foo = b.foo; // CHECK: A::hector = b.foo;
20
 
  }
21
 
  foo = b.foo; // CHECK: foo = b.foo;
22
 
}
23
 
// Use grep -FUbo 'foo;' <file> to get the correct offset of foo when changing
24
 
// this file.