// RUN: cat %s > %t.cpp
// RUN: clang-rename -offset=170 -new-name=hector %t.cpp -i --
// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
// REQUIRES: shell
namespace A {
int foo;  // CHECK: int hector;
}
int foo;  // CHECK: int foo;
int bar = foo; // CHECK: bar = foo;
int baz = A::foo; // CHECK: baz = A::hector;
void fun1() {
  struct {
    int foo; // CHECK: int foo;
  } b = { 100 };
  int foo = 100; // CHECK: int foo
  baz = foo; // CHECK: baz = foo;
  {
    extern int foo; // CHECK: int foo;
    baz = foo; // CHECK: baz = foo;
    foo = A::foo + baz; // CHECK: foo = A::hector + baz;
    A::foo = b.foo; // CHECK: A::hector = b.foo;
  }
  foo = b.foo; // CHECK: foo = b.foo;
}
// Use grep -FUbo 'foo;' <file> to get the correct offset of foo when changing
// this file.

namespace A { int foo;  // CHECK: int hector;
}
// RUN: cat %s > %t.cpp
// RUN: clang-rename -offset=18 -new-name=hector %t.cpp -i --
// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
int foo;  // CHECK: int foo;
int bar = foo; // CHECK: bar = foo;
int baz = A::foo; // CHECK: baz = A::hector;
void fun1() {
  struct {
    int foo; // CHECK: int foo;
  } b = { 100 };
  int foo = 100; // CHECK: int foo
  baz = foo; // CHECK: baz = foo;
  {
    extern int foo; // CHECK: int foo;
    baz = foo; // CHECK: baz = foo;
    foo = A::foo + baz; // CHECK: foo = A::hector + baz;
    A::foo = b.foo; // CHECK: A::hector = b.foo;
  }
  foo = b.foo; // CHECK: foo = b.foo;
}
// Use grep -FUbo 'foo;' <file> to get the correct offset of foo when changing
// this file.

Make test EOL tolerant by moving the symbol ot the first line before any EOL changes the byte offset count and enable it on Windows.
Make test EOL tolerant by moving the symbol ot the first line
before any EOL changes the byte offset count and enable it on Windows.



git-svn-id: a34e9779ed74578ad5922b3306b3d80a0c825546@245688 91177308-0d34-0410-b5e6-96231b3b80d8
