[clang-tools-extra] r276620 - [clang-rename] fix typos in tests

Kirill Bobyrev via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 25 01:56:11 PDT 2016


Author: omtcyfz
Date: Mon Jul 25 03:56:11 2016
New Revision: 276620

URL: http://llvm.org/viewvc/llvm-project?rev=276620&view=rev
Log:
[clang-rename] fix typos in tests

TemplateFunctionFindBy{Declaration|Use}.cpp contained typos and therefore were
failing. clang-rename passes these tests after typos are fixed.

Modified:
    clang-tools-extra/trunk/test/clang-rename/TemplateFunctionFindByDeclaration.cpp
    clang-tools-extra/trunk/test/clang-rename/TemplateFunctionFindByUse.cpp

Modified: clang-tools-extra/trunk/test/clang-rename/TemplateFunctionFindByDeclaration.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-rename/TemplateFunctionFindByDeclaration.cpp?rev=276620&r1=276619&r2=276620&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-rename/TemplateFunctionFindByDeclaration.cpp (original)
+++ clang-tools-extra/trunk/test/clang-rename/TemplateFunctionFindByDeclaration.cpp Mon Jul 25 03:56:11 2016
@@ -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;
 }
 

Modified: clang-tools-extra/trunk/test/clang-rename/TemplateFunctionFindByUse.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-rename/TemplateFunctionFindByUse.cpp?rev=276620&r1=276619&r2=276620&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-rename/TemplateFunctionFindByUse.cpp (original)
+++ clang-tools-extra/trunk/test/clang-rename/TemplateFunctionFindByUse.cpp Mon Jul 25 03:56:11 2016
@@ -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;
 }




More information about the cfe-commits mailing list