TemplateFunctionFindBy{Declaration|Use}.cpp contained typos and therefore were
failing. clang-rename passes these tests after typos are fixed.
llvm-svn: 276620
// 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;
}
// 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;
}