summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/unittests/clang-rename
Commit message (Collapse)AuthorAgeFilesLines
* [refactor] Move clang-rename into the clang repositoryAlex Lorenz2017-06-303-824/+0
| | | | | | | | | | | | The core engine of clang-rename will be used for local and global renames in the new refactoring engine, as mentioned in http://lists.llvm.org/pipermail/cfe-dev/2017-June/054286.html. The clang-rename tool is still supported but might get deprecated in the future. Differential Revision: https://reviews.llvm.org/D34696 llvm-svn: 306840
* clang-rename: add new -force optionMiklos Vajna2017-06-021-1/+1
| | | | | | | | | | | | | | | | | Summary: The use-case is when renaming a widely used name, like a lower-level class in a codebase and clang-rename is simply invoked for each translation unit based on the compile database. In this case it's not interesting to show errors: not finding the symbol means there is simply nothing to do. Reviewers: klimek Reviewed By: klimek Differential Revision: https://reviews.llvm.org/D32403 llvm-svn: 304534
* Fix compiler warnings: "ISO c99 requires rest arguments to be used" onHaojian Wu2017-04-071-3/+3
| | | | | | the test file. llvm-svn: 299764
* Fix -Wmissing-field-initializer warnings to unbreak the -Werror buildDavid Blaikie2017-04-051-49/+65
| | | | llvm-svn: 299561
* [clang-rename] Support renaming qualified symbolHaojian Wu2017-04-043-49/+676
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The patch adds a new feature for renaming qualified symbol references. Unlike orginal clang-rename behavior, when renaming a qualified symbol to a new qualified symbol (e.g "A::Foo" => "B::Bar"), this new rename behavior will consider the prefix qualifiers of the symbol, and calculate the new prefix qualifiers. It aims to add as few additional qualifiers as possible. As this is an early version (only supports renaming classes), I don't change current clang-rename interfaces at the moment, and would like to keep its (command-line tool) behavior. So I added new interfaces for the prototype. In the long run, these interfaces should be unified. No functionality changes in original clang-rename command-line tool. This patch also contains a few bug fixes of clang-rename which are discovered by the new unittest: * fix a potential nullptr accessment when class declaration doesn't have definition. * add USRs of nested declartaions in "getNamedDeclFor". Reviewers: ioeric Reviewed By: ioeric Subscribers: alexfh, cfe-commits, mgorny Differential Revision: https://reviews.llvm.org/D31176 llvm-svn: 299419
* [clang-rename] Introduce an unittest skeleton for clang-rename.Haojian Wu2017-03-102-0/+181
| | | | | | | | | | | | | | Summary: This will make references rename tests easier. Reviewers: ioeric Reviewed By: ioeric Subscribers: cfe-commits, alexfh, mgorny Differential Revision: https://reviews.llvm.org/D30813 llvm-svn: 297450
* [clang-rename] Merge rename-{at|all} & optimise.Kirill Bobyrev2016-09-162-108/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* ClangRenameTests: Update libdeps.NAKAMURA Takumi2016-07-221-0/+1
| | | | llvm-svn: 276445
* ClangRenameTests: Update libdeps. r275958 introduced clangASTMatchers.NAKAMURA Takumi2016-07-191-0/+1
| | | | llvm-svn: 275985
* Fix build of ClangRenameTestsMiklos Vajna2016-06-211-1/+1
| | | | | | Adapt the test to the code change introduced in r273304. llvm-svn: 273314
* Fix Clang-tidy modernize-deprecated-headers warnings; other minor fixes.Eugene Zelenko2016-03-171-4/+3
| | | | | | Differential revision: http://reviews.llvm.org/D18231 llvm-svn: 263726
* Remove autoconf supportChris Bieneman2016-01-261-25/+0
| | | | | | | | | | | | | | | | Summary: This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html "Now I am become Death, the destroyer of worlds." -J. Robert Oppenheimer Reviewers: chandlerc, grosbach, bob.wilson, echristo Subscribers: cfe-commits, klimek Differential Revision: http://reviews.llvm.org/D16475 llvm-svn: 258864
* Revert "Adapt clang-tools-extra to clang module format changes."Adrian Prantl2015-02-251-3/+2
| | | | | | This reverts commit 230424. llvm-svn: 230456
* Adapt clang-tools-extra to clang module format changes.Adrian Prantl2015-02-251-2/+3
| | | | | | | - add clangCodeGen.a to the tools that need it - tweak pp-trace command line handling to not conflict with clang's. llvm-svn: 230424
* Revert "Adapt Makefile dependencies for the clang module format change in ↵Adrian Prantl2015-02-211-4/+3
| | | | | | r230089." llvm-svn: 230104
* Adapt Makefile dependencies for the clang module format change in r230089.Adrian Prantl2015-02-201-3/+4
| | | | llvm-svn: 230090
* [cleanup] Re-sort the #include lines with llvm/utils/sort_includes.pyChandler Carruth2015-01-141-3/+3
| | | | | | | No functionality changed, this is just a mechanical cleanup to keep the order of #include lines consistent across the project. llvm-svn: 225976
* Re-structure clang-rename into a library and the tool.Manuel Klimek2014-10-131-5/+6
| | | | | | | | This allows the unit tests to link the library. Patch by Xin Huang. llvm-svn: 219609
* ClangRenameTests: Prune redundant libdeps.NAKAMURA Takumi2014-09-221-10/+0
| | | | llvm-svn: 218235
* Add newline at eof.NAKAMURA Takumi2014-09-221-1/+1
| | | | llvm-svn: 218234
* Revert rL215947: "[clang-rename] revert r215839"Manuel Klimek2014-08-203-0/+141
| | | | | | Make tests not depend on grep supporting -bo. llvm-svn: 216041
* [clang-rename] revert r215839Gerolf Hoflehner2014-08-183-141/+0
| | | | | | | | | | | | | | | | | | | | The commit broke public build bots for more than 24 hours. (view as text) ******************** TEST 'Clang Tools :: clang-rename/VarTest.cpp' FAILED ******************** Script: -- cat /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin11-nobootstrap-RAincremental/clang.src/tools/extra/test/clang-rename/VarTest.cpp > /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin11-nobootstrap-RAincremental/clang-build/tools/clang/tools/extra/test/clang-rename/Output/VarTest.cpp.tmp.cpp clang-rename -offset=$(grep -FUbo 'foo;' /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin11-nobootstrap-RAincremental/clang-build/tools/clang/tools/extra/test/clang-rename/Output/VarTest.cpp.tmp.cpp | head -1 | cut -d: -f1) -new-name=hector /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin11-nobootstrap-RAincremental/clang-build/tools/clang/tools/extra/test/clang-rename/Output/VarTest.cpp.tmp.cpp -i -- sed 's,//.*,,' /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin11-nobootstrap-RAincremental/clang-build/tools/clang/tools/extra/test/clang-rename/Output/VarTest.cpp.tmp.cpp | FileCheck /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin11-nobootstrap-RAincremental/clang.src/tools/extra/test/clang-rename/VarTest.cpp -- Exit Code: 1 Command Output (stderr): -- clang-rename: could not find symbol at /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin11-nobootstrap-RAincremental/clang-build/tools/clang/tools/extra/test/clang-rename/Output/VarTest.cpp.tmp.cpp:2:1 (offset 14). llvm-svn: 215947
* Revert r215854 corresponding to r215857, "Suppress ↵NAKAMURA Takumi2014-08-171-2/+1
| | | | | | ClangRenameTests/USRLocFinding.FindsVarUSR on msc17 for now. Will fix later." llvm-svn: 215859
* Remove initializer list.Manuel Klimek2014-08-171-5/+12
| | | | llvm-svn: 215857
* Suppress ClangRenameTests/USRLocFinding.FindsVarUSR on msc17 for now. Will ↵NAKAMURA Takumi2014-08-171-1/+2
| | | | | | fix later. llvm-svn: 215854
* First version of a clang-rename tool.Manuel Klimek2014-08-173-0/+134
Summary: Note that this code is still grossly under-tested - the next steps will be to add significantly better test coverage. Patch by Matthew Plant. Test Plan: Reviewers: Subscribers: llvm-svn: 215839
OpenPOWER on IntegriCloud