[clang-rename] fix typos in tests
authorKirill Bobyrev <omtcyfz@gmail.com>
Mon, 25 Jul 2016 08:56:11 +0000 (08:56 +0000)
committerKirill Bobyrev <omtcyfz@gmail.com>
Mon, 25 Jul 2016 08:56:11 +0000 (08:56 +0000)
TemplateFunctionFindBy{Declaration|Use}.cpp contained typos and therefore were
failing. clang-rename passes these tests after typos are fixed.

llvm-svn: 276620

clang-tools-extra/test/clang-rename/TemplateFunctionFindByDeclaration.cpp
clang-tools-extra/test/clang-rename/TemplateFunctionFindByUse.cpp

index b79dba4..f652902 100644 (file)
@@ -1,12 +1,9 @@
 // RUN: cat %s > %t.cpp
-// RUN: clang-rename -offset=241 -new-name=bar %t.cpp -i --
+// RUN: clang-rename -offset=154 -new-name=bar %t.cpp -i --
 // RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
 
-// FIXME: clang-rename should be able to rename functions with templates.
-// XFAIL: *
-
 template <typename T>
-T foo(T value) {    // CHECK: T boo(T value) {
+T foo(T value) {    // CHECK: T bar(T value) {
   return value;
 }
 
index b307732..a3d1717 100644 (file)
@@ -1,17 +1,14 @@
 // RUN: cat %s > %t.cpp
-// RUN: clang-rename -offset=290 -new-name=Bar %t.cpp -i --
+// RUN: clang-rename -offset=233 -new-name=bar %t.cpp -i --
 // RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
 
-// FIXME: clang-rename should be able to rename functions with templates.
-// XFAIL: *
-
 template <typename T>
-T foo(T value) {
+T foo(T value) {    // CHECK: T bar(T value) {
   return value;
 }
 
 int main() {
-  foo<bool>(false);
-  foo<int>(0);
+  foo<bool>(false); // CHECK: bar<bool>(false);
+  foo<int>(0);      // CHECK: bar<int>(0);
   return 0;
 }