[clang-rename] revert r276836

Revert r276836, which resulted in tests passing regardless of the actual tool
replacements.

llvm-svn: 277354
This commit is contained in:
Kirill Bobyrev 2016-08-01 16:48:33 +00:00
parent 6ac7dd19f7
commit 08c47b37d3
27 changed files with 96 additions and 43 deletions

View File

@ -1,4 +1,6 @@
// RUN: clang-rename -offset=74 -new-name=Bar %s -- | FileCheck %s // RUN: cat %s > %t.cpp
// RUN: clang-rename -offset=136 -new-name=Bar %t.cpp -i --
// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
class Foo {}; // CHECK: class Bar {}; class Foo {}; // CHECK: class Bar {};

View File

@ -1,4 +1,6 @@
// RUN: clang-rename -offset=243 -new-name=Bar %s -- | FileCheck %s // RUN: cat %s > %t.cpp
// RUN: clang-rename -offset=304 -new-name=Bar %t.cpp -i --
// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
class Foo {}; // CHECK: class Bar {}; class Foo {}; // CHECK: class Bar {};

View File

@ -1,4 +1,6 @@
// RUN: clang-rename -old-name=Foo -new-name=Bar %s -- | FileCheck %s // RUN: cat %s > %t.cpp
// RUN: clang-rename -old-name=Foo -new-name=Bar %t.cpp -i --
// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
class Foo { // CHECK: class Bar class Foo { // CHECK: class Bar
}; };

View File

@ -1,4 +1,6 @@
// RUN: clang-rename -offset=74 -new-name=Bar %s -- | FileCheck %s // RUN: cat %s > %t.cpp
// RUN: clang-rename -offset=136 -new-name=Bar %t.cpp -i --
// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
class Foo { // CHECK: class Bar { class Foo { // CHECK: class Bar {
public: public:

View File

@ -1,4 +1,6 @@
// RUN: clang-rename -offset=74 -new-name=Bar %s -- | FileCheck %s // RUN: cat %s > %t.cpp
// RUN: clang-rename -offset=136 -new-name=Bar %t.cpp -i --
// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
class Foo {}; // CHECK: class Bar class Foo {}; // CHECK: class Bar
@ -7,5 +9,5 @@ int main() {
return 0; return 0;
} }
// Use grep -FUbo 'Foo' <file> to get the correct offset of Foo when changing // Use grep -FUbo 'Foo' <file> to get the correct offset of Cla when changing
// this file. // this file.

View File

@ -1,4 +1,6 @@
// RUN: clang-rename -offset=159 -new-name=Bar %s -- | FileCheck %s // RUN: cat %s > %t.cpp
// RUN: clang-rename -offset=220 -new-name=Bar %t.cpp -i --
// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
// Forward declaration. // Forward declaration.
class Foo; // CHECK: class Bar; class Foo; // CHECK: class Bar;

View File

@ -1,4 +1,6 @@
// RUN: clang-rename -offset=74 -new-name=Bar %s -- | FileCheck %s // RUN: cat %s > %t.cpp
// RUN: clang-rename -offset=136 -new-name=Bar %t.cpp -i --
// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
class Foo { // CHECK: class Bar { class Foo { // CHECK: class Bar {
public: public:
@ -12,5 +14,5 @@ int main() {
const_cast<Foo *>(C)->getValue(); // CHECK: const_cast<Bar *>(C)->getValue(); 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 // Use grep -FUbo 'Cla' <file> to get the correct offset of foo when changing
// this file. // this file.

View File

@ -1,4 +1,6 @@
// RUN: clang-rename -offset=74 -new-name=Boo %s -- | FileCheck %s // RUN: cat %s > %t.cpp
// RUN: clang-rename -offset=136 -new-name=Boo %t.cpp -i --
// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
class Foo {}; // CHECK: class Boo {}; class Foo {}; // CHECK: class Boo {};
@ -6,5 +8,5 @@ int main() {
Foo *C = new Foo(); // CHECK: Boo *C = new Boo(); Foo *C = new Foo(); // CHECK: Boo *C = new Boo();
} }
// Use grep -FUbo 'Foo' <file> to get the correct offset of Foo when changing // Use grep -FUbo 'Boo' <file> to get the correct offset of foo when changing
// this file. // this file.

View File

@ -1,4 +1,6 @@
// RUN: clang-rename -offset=113 -new-name=Bar %s -- | FileCheck %s // RUN: cat %s > %t.cpp
// RUN: clang-rename -offset=174 -new-name=Bar %t.cpp -i --
// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
class Foo { // CHECK: class Bar class Foo { // CHECK: class Bar
public: public:
@ -7,5 +9,5 @@ public:
Foo::Foo() {} // CHECK: Bar::Bar() Foo::Foo() {} // CHECK: Bar::Bar()
// Use grep -FUbo 'Foo' <file> to get the correct offset of Foo when changing // Use grep -FUbo 'C' <file> to get the correct offset of foo when changing
// this file. // this file.

View File

@ -1,4 +1,6 @@
// RUN: clang-rename -offset=151 -new-name=Bar %s -- | FileCheck %s // RUN: cat %s > %t.cpp
// RUN: clang-rename -offset=212 -new-name=Bar %t.cpp -i --
// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
class Foo { // CHECK: class Bar class Foo { // CHECK: class Bar
public: public:
@ -7,5 +9,5 @@ public:
Foo::Foo() {} // CHECK: Bar::Bar() Foo::Foo() {} // CHECK: Bar::Bar()
// Use grep -FUbo 'Foo' <file> to get the correct offset of Foo when changing // Use grep -FUbo 'C' <file> to get the correct offset of foo when changing
// this file. // this file.

View File

@ -1,4 +1,6 @@
// RUN: clang-rename -offset=102 -new-name=Bar %s -- | FileCheck %s // RUN: cat %s > %t.cpp
// RUN: clang-rename -offset=163 -new-name=Bar %t.cpp -i --
// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
class Baz {}; class Baz {};

View File

@ -1,4 +1,6 @@
// RUN: clang-rename -offset=100 -new-name=Bar %s -- | FileCheck %s // RUN: cat %s > %t.cpp
// RUN: clang-rename -offset=161 -new-name=Bar %t.cpp -i --
// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
class C { class C {
public: public:
@ -14,5 +16,5 @@ int main() {
int y = C::Foo; // CHECK: C::Bar int y = C::Foo; // CHECK: C::Bar
} }
// Use grep -FUbo 'Foo' <file> to get the correct offset of Foo when changing // Use grep -FUbo 'X' <file> to get the correct offset of foo when changing
// this file. // this file.

View File

@ -1,4 +1,6 @@
// RUN: clang-rename -offset=114 -new-name=Bar %s -- | FileCheck %s // RUN: cat %s > %t.cpp
// RUN: clang-rename -offset=175 -new-name=Bar %t.cpp -i --
// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
class Foo { // CHECK: class Bar { class Foo { // CHECK: class Bar {
public: public:
@ -8,5 +10,5 @@ public:
Foo::~Foo() { // CHECK: Bar::~Bar() Foo::~Foo() { // CHECK: Bar::~Bar()
} }
// Use grep -FUbo 'Foo' <file> to get the correct offset of Foo when changing // Use grep -FUbo 'Bar' <file> to get the correct offset of foo when changing
// this file. // this file.

View File

@ -1,4 +1,6 @@
// RUN: clang-rename -offset=158 -new-name=Bar %s -- | FileCheck %s // RUN: cat %s > %t.cpp
// RUN: clang-rename -offset=219 -new-name=Bar %t.cpp -i --
// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
class Foo { // CHECK: class Bar { class Foo { // CHECK: class Bar {
public: public:
@ -8,5 +10,5 @@ public:
Foo::~Foo() {} // CHECK: Bar::~Bar() Foo::~Foo() {} // CHECK: Bar::~Bar()
// Use grep -FUbo 'Foo' <file> to get the correct offset of Foo when changing // Use grep -FUbo 'Foo' <file> to get the correct offset of foo when changing
// this file. // this file.

View File

@ -1,4 +1,6 @@
// RUN: clang-rename -offset=134 -new-name=Bar %s -- -frtti | FileCheck %s // RUN: cat %s > %t.cpp
// RUN: clang-rename -offset=195 -new-name=Bar %t.cpp -i -- -frtti
// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
class Baz { class Baz {
virtual int getValue() const = 0; virtual int getValue() const = 0;
@ -20,5 +22,5 @@ int main() {
dynamic_cast<const Foo *>(Pointer)->getValue(); // CHECK: dynamic_cast<const Bar *>(Pointer)->getValue(); dynamic_cast<const Foo *>(Pointer)->getValue(); // CHECK: dynamic_cast<const Bar *>(Pointer)->getValue();
} }
// Use grep -FUbo 'Foo' <file> to get the correct offset of Foo when changing // Use grep -FUbo 'Foo' <file> to get the correct offset of foo when changing
// this file. // this file.

View File

@ -1,4 +1,6 @@
// RUN: clang-rename -offset=87 -new-name=Bar %s -- | FileCheck %s // RUN: cat %s > %t.cpp
// RUN: clang-rename -offset=148 -new-name=Bar %t.cpp -i --
// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
class Baz { class Baz {
int Foo; // CHECK: Bar; int Foo; // CHECK: Bar;

View File

@ -1,4 +1,6 @@
// RUN: clang-rename -offset=138 -new-name=macro_function %s -- | FileCheck %s // RUN: cat %s > %t.cpp
// RUN: clang-rename -offset=199 -new-name=macro_function %t.cpp -i --
// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
#define moo foo // CHECK: #define moo macro_function #define moo foo // CHECK: #define moo macro_function
@ -15,5 +17,5 @@ void qoo() {
boo(moo()); boo(moo());
} }
// Use grep -FUbo 'foo' <file> to get the correct offset of foo when changing // Use grep -FUbo 'foo;' <file> to get the correct offset of foo when changing
// this file. // this file.

View File

@ -1,4 +1,6 @@
// RUN: clang-rename -offset=95 -new-name=Bar %s -- | FileCheck %s // RUN: cat %s > %t.cpp
// RUN: clang-rename -offset=156 -new-name=Bar %t.cpp -i --
// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
class Baz { class Baz {
public: public:

View File

@ -1,4 +1,6 @@
// RUN: clang-rename -offset=79 -new-name=llvm %s -- | FileCheck %s // RUN: cat %s > %t.cpp
// RUN: clang-rename -offset=143 -new-name=llvm %t.cpp -i --
// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
namespace foo { // CHECK: namespace llvm { namespace foo { // CHECK: namespace llvm {
int x; int x;
@ -8,5 +10,5 @@ void boo() {
foo::x = 42; // CHECK: llvm::x = 42; foo::x = 42; // CHECK: llvm::x = 42;
} }
// Use grep -FUbo 'foo' <file> to get the correct offset of foo when changing // Use grep -FUbo 'foo;' <file> to get the correct offset of foo when changing
// this file. // this file.

View File

@ -1,5 +1,6 @@
// RUN: clang-rename -offset=73 -new-name=X %s -- | FileCheck %s // RUN: cat %s > %t.cpp
// RUN: clang-rename -offset=133 -new-name=X %t.cpp -i --
// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
class Cla { class Cla {
public: public:
int getValue() const { int getValue() const {
@ -12,5 +13,5 @@ int main() {
reinterpret_cast<const Cla *>(C)->getValue(); // CHECK: reinterpret_cast<const X *> reinterpret_cast<const Cla *>(C)->getValue(); // CHECK: reinterpret_cast<const X *>
} }
// Use grep -FUbo 'Cla' <file> to get the correct offset of Cla when changing // Use grep -FUbo 'Cla' <file> to get the correct offset of foo when changing
// this file. // this file.

View File

@ -1,4 +1,6 @@
// RUN: clang-rename -offset=91 -new-name=Bar %s -- | FileCheck %s // RUN: cat %s > %t.cpp
// RUN: clang-rename -offset=152 -new-name=Bar %t.cpp -i --
// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
class Baz { class Baz {
}; };

View File

@ -1,4 +1,6 @@
// RUN: clang-rename -offset=93 -new-name=bar %s -- | FileCheck %s // RUN: cat %s > %t.cpp
// RUN: clang-rename -offset=154 -new-name=bar %t.cpp -i --
// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
template <typename T> template <typename T>
T foo(T value) { // CHECK: T bar(T value) { T foo(T value) { // CHECK: T bar(T value) {

View File

@ -1,4 +1,6 @@
// RUN: clang-rename -offset=172 -new-name=bar %s -- | FileCheck %s // RUN: cat %s > %t.cpp
// RUN: clang-rename -offset=233 -new-name=bar %t.cpp -i --
// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
template <typename T> template <typename T>
T foo(T value) { // CHECK: T bar(T value) { T foo(T value) { // CHECK: T bar(T value) {

View File

@ -1,4 +1,6 @@
// RUN: clang-rename -offset=289 -new-name=U %s -- | FileCheck %s // RUN: cat %s > %t.cpp
// RUN: clang-rename -offset=350 -new-name=U %t.cpp -i --
// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
// Currently unsupported test. // Currently unsupported test.
// FIXME: clang-rename should be able to rename template parameters correctly. // FIXME: clang-rename should be able to rename template parameters correctly.

View File

@ -1,4 +1,6 @@
// RUN: clang-rename -offset=75 -new-name=Bar %s -- | FileCheck %s // RUN: cat %s > %t.cpp
// RUN: clang-rename -offset=136 -new-name=Bar %t.cpp -i --
// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
class Foo { // CHECK: class Bar { class Foo { // CHECK: class Bar {
// ^ offset must be here // ^ offset must be here
@ -20,5 +22,5 @@ int main() {
return 0; return 0;
} }
// Use grep -FUbo 'Foo' <file> to get the correct offset of Foo when changing // Use grep -FUbo 'Foo' <file> to get the correct offset of Cla when changing
// this file. // this file.

View File

@ -1,4 +1,6 @@
// RUN: clang-rename -offset=87 -new-name=Bar %s -- | FileCheck %s // RUN: cat %s > %t.cpp
// RUN: clang-rename -offset=148 -new-name=Bar %t.cpp -i --
// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
namespace A { namespace A {
int Foo; // CHECK: int Bar; int Foo; // CHECK: int Bar;
@ -21,5 +23,5 @@ void fun() {
Foo = b.Foo; // Foo = b.Foo; Foo = b.Foo; // Foo = b.Foo;
} }
// Use grep -FUbo 'Foo' <file> to get the correct offset of Foo when changing // Use grep -FUbo 'Foo' <file> to get the correct offset of foo when changing
// this file. // this file.

View File

@ -1,4 +1,6 @@
// RUN: clang-rename -offset=147 -new-name=Z %s -- | FileCheck %s // RUN: cat %s > %t.cpp
// RUN: clang-rename -offset=208 -new-name=Z %t.cpp -i --
// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
#define Y X // CHECK: #define Y Z #define Y X // CHECK: #define Y Z
@ -12,5 +14,5 @@ void macro() {
foo(Y); foo(Y);
} }
// Use grep -FUbo 'X' <file> to get the correct offset of X when changing // Use grep -FUbo 'foo;' <file> to get the correct offset of foo when changing
// this file. // this file.