summaryrefslogtreecommitdiffstats
path: root/tools/clang-rename
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@vmiklos.hu>2017-09-11 20:18:38 +0000
committerMiklos Vajna <vmiklos@vmiklos.hu>2017-09-11 20:18:38 +0000
commit440d6c02ac5cfe1d6f777a2d0f61686783c108f1 (patch)
treee8b391248b3e2c9688abaea7dba11e5bfa960a16 /tools/clang-rename
parent13258ab9210ece98081740f3b76470a6e77a0012 (diff)
clang-rename: let -force handle multiple renames
Summary: The use case is that renaming multiple symbols in a large enough codebase is much faster if all of these can be done with a single invocation, but there will be multiple translation units where one or more symbols are not found. Old behavior was to exit with an error (default) or exit without reporting an error (-force). New behavior is that -force results in a best-effort rename: rename symbols which are found and just ignore the rest. The existing help for -force sort of already implies this behavior. Reviewers: cfe-commits, klimek, arphaman Reviewed By: klimek Differential Revision: https://reviews.llvm.org/D37634 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@312942 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/clang-rename')
-rw-r--r--tools/clang-rename/ClangRename.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/tools/clang-rename/ClangRename.cpp b/tools/clang-rename/ClangRename.cpp
index cc18a05bcd..fca12ca60c 100644
--- a/tools/clang-rename/ClangRename.cpp
+++ b/tools/clang-rename/ClangRename.cpp
@@ -175,12 +175,6 @@ int main(int argc, const char **argv) {
return 1;
}
- if (Force && PrevNames.size() < NewNames.size()) {
- // No matching PrevName for all NewNames. Without Force this is an error
- // above already.
- return 0;
- }
-
// Perform the renaming.
tooling::RenamingAction RenameAction(NewNames, PrevNames, USRList,
Tool.getReplacements(), PrintLocations);