[PATCH] D23198: clang-rename rename-all: support reading old/newname pairs from a YAML file
Kirill Bobyrev via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 5 06:31:22 PDT 2016
omtcyfz added a comment.
Still don't see general use case for that one, but since we already support multiple renamings "at once"...
Would also be nice to support at least `offset + new-name` in YAML input files, too.
================
Comment at: clang-rename/tool/ClangRename.cpp:140
@@ -116,1 +139,3 @@
cl::value_desc("filename"), cl::cat(*Category));
+ cl::opt<std::string> Input(
+ "input", cl::desc("YAML file to load oldname-newname pairs from."),
----------------
"Input" name doesn't make sense to me here.
================
Comment at: docs/clang-rename.rst:70
@@ -53,2 +69,3 @@
+
The tool currently supports renaming actions inside a single Translation Unit
only. It is planned to extend the tool's functionality to support multi-TU
----------------
Please move this block upwards [preferably right after line 42]. I consider information about limitations and editor more important than numerous `clang-rename`'s terminal interface invocation examples.
================
Comment at: test/clang-rename/ClassTestMultiByNameYAML.cpp:3
@@ +2,3 @@
+// RUN: clang-rename rename-all -input %s.yaml %t.cpp -i --
+// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
+class Foo1 { // CHECK: class Bar1
----------------
https://reviews.llvm.org/D23158 introduces simpler `clang-rename` invocations in tests. Please do that here, too.
https://reviews.llvm.org/D23198
More information about the cfe-commits
mailing list