[clang-rename] Merge rename-{at|all} & optimise.
authorKirill Bobyrev <omtcyfz@gmail.com>
Fri, 16 Sep 2016 08:45:19 +0000 (08:45 +0000)
committerKirill Bobyrev <omtcyfz@gmail.com>
Fri, 16 Sep 2016 08:45:19 +0000 (08:45 +0000)
commite5e7e153b5c7691b861b014844e760dccca42a16
tree55b9afd6c1fbd30736653efbcc4d6f679cb166b9
parentb4e15b8ceeaf891a5ca5a8192f0719c5bda6d7ce
[clang-rename] Merge rename-{at|all} & optimise.

Having both rename-at and rename-all both seems confusing and introduces
unneeded difficulties. After merging rename-at and rename-all maintaining main
function wrappers and custom help becomes redundant while CLI becomes less
confusing.

D24224 (which was the original patch causing buildbot failures) wasn't aware of
bugs caused by passing both -offset and -qualified-name. After D24224 was landed
it caused buildbot failures and therefor I just reverted it.

Two things that make this patch different from D24224 are:

* unittests/clang-rename was deleted, because it is unmaintained and doesn't do
much.
* Passing both `-offset` and `-qualified-name` isn't allowed anymore for the
sake of preventing bugs.

This patch is a trivial enhancement of accepted D24224 revision.

Tested with `ninja check-all`.

Differential Revision: https://reviews.llvm.org/D24567

llvm-svn: 281710
17 files changed:
clang-tools-extra/clang-rename/USRFindingAction.cpp
clang-tools-extra/clang-rename/USRFindingAction.h
clang-tools-extra/clang-rename/tool/ClangRename.cpp
clang-tools-extra/docs/clang-rename.rst
clang-tools-extra/test/clang-rename/ClassFindByName.cpp
clang-tools-extra/test/clang-rename/ClassTestMulti.cpp
clang-tools-extra/test/clang-rename/ClassTestMultiByName.cpp
clang-tools-extra/test/clang-rename/ClassTestMultiByNameYAML.cpp [deleted file]
clang-tools-extra/test/clang-rename/FunctionWithClassFindByName.cpp
clang-tools-extra/test/clang-rename/Inputs/OffsetToNewName.yaml [moved from clang-tools-extra/test/clang-rename/Inputs/ClassTestMultiByNameYAMLRenameAt.yaml with 100% similarity]
clang-tools-extra/test/clang-rename/Inputs/QualifiedNameToNewName.yaml [moved from clang-tools-extra/test/clang-rename/Inputs/ClassTestMultiByNameYAMLRenameAll.yaml with 54% similarity]
clang-tools-extra/test/clang-rename/InvalidOldName.cpp [deleted file]
clang-tools-extra/test/clang-rename/NoNewName.cpp
clang-tools-extra/test/clang-rename/YAMLInput.cpp [new file with mode: 0644]
clang-tools-extra/unittests/CMakeLists.txt
clang-tools-extra/unittests/clang-rename/CMakeLists.txt [deleted file]
clang-tools-extra/unittests/clang-rename/USRLocFindingTest.cpp [deleted file]