diff --git a/clang-tools-extra/test/clang-rename/ClassTest.cpp b/clang-tools-extra/test/clang-rename/ClassTest.cpp deleted file mode 100644 index a2b8f0cf5291..000000000000 --- a/clang-tools-extra/test/clang-rename/ClassTest.cpp +++ /dev/null @@ -1,15 +0,0 @@ -// RUN: cat %s > %t.cpp -// RUN: clang-rename -offset=138 -new-name=Hector %t.cpp -i -- -// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s -class Cla // CHECK: class Hector -{ -}; - -int main() -{ - Cla *Pointer = 0; // CHECK: Hector *Pointer = 0; - return 0; -} - -// Use grep -FUbo 'Cla' to get the correct offset of Cla when changing -// this file. diff --git a/clang-tools-extra/test/clang-rename/ClassTestByName.cpp b/clang-tools-extra/test/clang-rename/ClassTestByName.cpp deleted file mode 100644 index 6b00181258ba..000000000000 --- a/clang-tools-extra/test/clang-rename/ClassTestByName.cpp +++ /dev/null @@ -1,10 +0,0 @@ -// RUN: cat %s > %t.cpp -// RUN: clang-rename -old-name=Cla -new-name=Hector %t.cpp -i -- -// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s -class Cla { // CHECK: class Hector -}; - -int main() { - Cla *Pointer = 0; // CHECK: Hector *Pointer = 0; - return 0; -} diff --git a/clang-tools-extra/test/clang-rename/ClassTestReplacements.cpp b/clang-tools-extra/test/clang-rename/ClassTestReplacements.cpp deleted file mode 100644 index 086839508cae..000000000000 --- a/clang-tools-extra/test/clang-rename/ClassTestReplacements.cpp +++ /dev/null @@ -1,12 +0,0 @@ -// RUN: rm -rf %t -// RUN: mkdir -p %t/fixes -// RUN: cat %s > %t.cpp -// RUN: clang-rename -offset=256 -new-name=Hector -export-fixes=%t/fixes/clang-rename.yaml %t.cpp -- -// RUN: clang-apply-replacements %t -// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s -class Cla // CHECK: class Hector -{ -}; - -// Use grep -FUbo 'Cla' to get the correct offset of Cla when changing -// this file. diff --git a/clang-tools-extra/test/clang-rename/ComplicatedClassTest.cpp b/clang-tools-extra/test/clang-rename/ComplicatedClassType.cpp similarity index 100% rename from clang-tools-extra/test/clang-rename/ComplicatedClassTest.cpp rename to clang-tools-extra/test/clang-rename/ComplicatedClassType.cpp diff --git a/clang-tools-extra/test/clang-rename/CtorDefTest.cpp b/clang-tools-extra/test/clang-rename/CtorDefTest.cpp deleted file mode 100644 index 192028a25c0a..000000000000 --- a/clang-tools-extra/test/clang-rename/CtorDefTest.cpp +++ /dev/null @@ -1,15 +0,0 @@ -// RUN: cat %s > %t.cpp -// RUN: clang-rename -offset=133 -new-name=D %t.cpp -i -- -// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s -class C -{ -public: - C(); -}; - -C::C() // CHECK: D::D() -{ -} - -// Use grep -FUbo 'C' to get the correct offset of foo when changing -// this file. diff --git a/clang-tools-extra/test/clang-rename/CtorInitializerTest.cpp b/clang-tools-extra/test/clang-rename/CtorInitializerTest.cpp deleted file mode 100644 index dd5c790f763d..000000000000 --- a/clang-tools-extra/test/clang-rename/CtorInitializerTest.cpp +++ /dev/null @@ -1,20 +0,0 @@ -// RUN: cat %s > %t.cpp -// RUN: clang-rename -offset=162 -new-name=hector %t.cpp -i -- -// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s -class A -{ -}; - -class Cla -{ - A foo; // CHECK: hector; -public: - Cla(); -}; - -Cla::Cla() // CHECK: Cla::Cla() -{ -} - -// Use grep -FUbo 'foo' to get the correct offset of foo when changing -// this file. diff --git a/clang-tools-extra/test/clang-rename/DtorDefTest.cpp b/clang-tools-extra/test/clang-rename/DtorDefTest.cpp deleted file mode 100644 index 58c8bb55f139..000000000000 --- a/clang-tools-extra/test/clang-rename/DtorDefTest.cpp +++ /dev/null @@ -1,17 +0,0 @@ -// RUN: cat %s > %t.cpp -// RUN: clang-rename -offset=135 -new-name=Bar %t.cpp -i -- -// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s -class Foo { -public: - Foo(); - ~Foo(); // CHECK: ~Bar(); -}; - -Foo::Foo() { -} - -Foo::~Foo() { // CHECK: Bar::~Bar() -} - -// Use grep -FUbo 'Foo' to get the correct offset of foo when changing -// this file. diff --git a/clang-tools-extra/test/clang-rename/DynamicCastExpr.cpp b/clang-tools-extra/test/clang-rename/DynamicCastExpr.cpp index 2d5e063af752..b940dd7dcc03 100644 --- a/clang-tools-extra/test/clang-rename/DynamicCastExpr.cpp +++ b/clang-tools-extra/test/clang-rename/DynamicCastExpr.cpp @@ -1,11 +1,12 @@ // RUN: cat %s > %t.cpp -// RUN: clang-rename -offset=193 -new-name=X %t.cpp -i -- -frtti +// RUN: clang-rename -offset=195 -new-name=Bar %t.cpp -i -- -frtti // RUN: sed 's,//.*,,' %t.cpp | FileCheck %s -class Base { + +class Baz { virtual int getValue() const = 0; }; -class Derived : public Base { +class Foo : public Baz { // CHECK: class Bar : public Baz { public: int getValue() const { return 0; @@ -13,13 +14,13 @@ public: }; int main() { - Derived D; - const Base &Reference = D; - const Base *Pointer = &D; + Foo foo; // FIXME: Bar foo; <- this one fails + const Baz &Reference = foo; + const Baz *Pointer = &foo; - dynamic_cast(Reference).getValue(); // CHECK: dynamic_cast - dynamic_cast(Pointer)->getValue(); // CHECK: dynamic_cast + dynamic_cast(Reference).getValue(); // CHECK: dynamic_cast(Reference).getValue(); + dynamic_cast(Pointer)->getValue(); // CHECK: dynamic_cast(Pointer)->getValue(); } -// Use grep -FUbo 'Derived' to get the correct offset of foo when changing +// Use grep -FUbo 'Foo' to get the correct offset of foo when changing // this file. diff --git a/clang-tools-extra/test/clang-rename/FieldTest.cpp b/clang-tools-extra/test/clang-rename/FieldTest.cpp deleted file mode 100644 index 89c34d190f23..000000000000 --- a/clang-tools-extra/test/clang-rename/FieldTest.cpp +++ /dev/null @@ -1,17 +0,0 @@ -// RUN: cat %s > %t.cpp -// RUN: clang-rename -offset=150 -new-name=hector %t.cpp -i -- -// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s -class Cla -{ - int foo; // CHECK: hector; -public: - Cla(); -}; - -Cla::Cla() - : foo(0) // CHECK: hector(0) -{ -} - -// Use grep -FUbo 'foo' to get the correct offset of foo when changing -// this file. diff --git a/clang-tools-extra/test/clang-rename/StaticCastExpr.cpp b/clang-tools-extra/test/clang-rename/StaticCastExpr.cpp index 2dd80c9f6495..b75102ab17ee 100644 --- a/clang-tools-extra/test/clang-rename/StaticCastExpr.cpp +++ b/clang-tools-extra/test/clang-rename/StaticCastExpr.cpp @@ -1,10 +1,11 @@ // RUN: cat %s > %t.cpp -// RUN: clang-rename -offset=150 -new-name=X %t.cpp -i -- +// RUN: clang-rename -offset=152 -new-name=Bar %t.cpp -i -- // RUN: sed 's,//.*,,' %t.cpp | FileCheck %s -class Base { + +class Baz { }; -class Derived : public Base { +class Foo : public Baz { // CHECK: class Bar : public Baz { public: int getValue() const { return 0; @@ -12,13 +13,13 @@ public: }; int main() { - Derived D; - const Base &Reference = D; - const Base *Pointer = &D; + Foo foo; // FIXME: Bar foo; + const Baz &Reference = foo; + const Baz *Pointer = &foo; - static_cast(Reference).getValue(); // CHECK: static_cast - static_cast(Pointer)->getValue(); // CHECK: static_cast + static_cast(Reference).getValue(); // CHECK: static_cast(Reference).getValue(); + static_cast(Pointer)->getValue(); // CHECK: static_cast(Pointer)->getValue(); } -// Use grep -FUbo 'Derived' to get the correct offset of foo when changing +// Use grep -FUbo 'Foo' to get the correct offset of foo when changing // this file. diff --git a/clang-tools-extra/test/clang-rename/VarTest.cpp b/clang-tools-extra/test/clang-rename/VarTest.cpp deleted file mode 100644 index 91c2f0e614ff..000000000000 --- a/clang-tools-extra/test/clang-rename/VarTest.cpp +++ /dev/null @@ -1,24 +0,0 @@ -// RUN: cat %s > %t.cpp -// RUN: clang-rename -offset=150 -new-name=hector %t.cpp -i -- -// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s -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;' to get the correct offset of foo when changing -// this file.