[PATCH] D23058: [clang-rename] add support for template instantiations

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 2 13:31:39 PDT 2016


alexfh requested changes to this revision.
This revision now requires changes to proceed.

================
Comment at: test/clang-rename/TemplateClassInstantiationFindByDeclaration.cpp:2
@@ -1,3 +1,3 @@
 // RUN: cat %s > %t.cpp
-// RUN: clang-rename -offset=287 -new-name=Bar %t.cpp -i --
+// RUN: clang-rename -offset=159 -new-name=Bar %t.cpp -i --
 // RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
----------------
It makes sense to move RUN lines to the end of the file (and add -fno-delayed-template-parsing, if windows buildbots start complaining).

================
Comment at: test/clang-rename/TemplateClassInstantiationFindByUninstantiatedType.cpp:2
@@ +1,3 @@
+// RUN: cat %s > %t.cpp
+// RUN: clang-rename -offset=440 -new-name=Bar %t.cpp -i --
+// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
----------------
This test looks exactly as the one above except for the offset. Instead of duplicating tests, we can run clang-rename multiple times and use different -check-prefix with FileCheck. In this case moving the RUN lines to the bottom makes even more sense.

Also, instructions for updating -offset are incorrect, if you have multiple different offsets.


https://reviews.llvm.org/D23058





More information about the cfe-commits mailing list