summaryrefslogtreecommitdiffstats
path: root/clang/lib/Tooling/Refactoring/Rename/USRLocFinder.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [Lookup] Invisible decls should not be ambiguous when renaming.Eric Liu2019-04-151-2/+2
| | | | | | | | | | | | | | | | | | Summary: For example, a renamed type in a header file can conflict with declaration in a random file that includes the header, but we should not consider the decl ambiguous if it's not visible at the rename location. This improves consistency of generated replacements when header file is included in different TUs. Reviewers: hokein Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60257 llvm-svn: 358378
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Port getLocEnd -> getEndLocStephen Kelly2018-08-091-2/+2
| | | | | | | | | | Reviewers: teemperor! Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D50351 llvm-svn: 339386
* Port getLocStart -> getBeginLocStephen Kelly2018-08-091-3/+3
| | | | | | | | | | Reviewers: teemperor! Subscribers: jholewinski, whisperity, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D50350 llvm-svn: 339385
* Remove \brief commands from doxygen comments.Adrian Prantl2018-05-091-3/+3
| | | | | | | | | | | | | | | | | | | This is similar to the LLVM change https://reviews.llvm.org/D46290. We've been running doxygen with the autobrief option for a couple of years now. This makes the \brief markers into our comments redundant. Since they are a visual distraction and we don't want to encourage more \brief markers in new code either, this patch removes them all. Patch produced by for i in $(git grep -l '\@brief'); do perl -pi -e 's/\@brief //g' $i & done for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done Differential Revision: https://reviews.llvm.org/D46320 llvm-svn: 331834
* Fix typos in clangAlexander Kornienko2018-04-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found via codespell -q 3 -I ../clang-whitelist.txt Where whitelist consists of: archtype cas classs checkk compres definit frome iff inteval ith lod methode nd optin ot pres statics te thru Patch by luzpaz! (This is a subset of D44188 that applies cleanly with a few files that have dubious fixes reverted.) Differential revision: https://reviews.llvm.org/D44188 llvm-svn: 329399
* [rename] support renaming class member.Haojian Wu2017-10-251-0/+49
| | | | | | | | | | | | Reviewers: ioeric Reviewed By: ioeric Subscribers: klimek, cfe-commits, mgorny Differential Revision: https://reviews.llvm.org/D39178 llvm-svn: 316571
* [rename] Don't overwrite the template argument when renaming a template ↵Haojian Wu2017-10-231-1/+6
| | | | | | | | | | | | | | function. Reviewers: ioeric Reviewed By: ioeric Subscribers: cierpuchaw, cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D39120 llvm-svn: 316314
* [clang-rename] Rename alias.Haojian Wu2017-10-181-60/+59
| | | | | | | | | | | | | | | | | | Summary: * Support rename alias. * Add unittests for renaming alias. * Don't generate fixes for the SourceLocations that are invalid or in temporary buffer, otherwise crash would be happened when generating AtomicChanges. Reviewers: ioeric Reviewed By: ioeric Subscribers: klimek, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D39043 llvm-svn: 316074
* [clang-rename] Rename enum.Haojian Wu2017-10-171-4/+40
| | | | | | | | | | | | | | | | Summary: * Add unit tests for renaming enum. * Support unscoped enum constants in expressions. Reviewers: ioeric Reviewed By: ioeric Subscribers: klimek, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D38989 llvm-svn: 315999
* [clang-rename] Add function unit tests.Haojian Wu2017-10-161-0/+23
| | | | | | | | | | | | | | | | | Summary: Also contain a fix: * Fix a false positive of renaming a using shadow function declaration. Reviewers: ioeric Reviewed By: ioeric Subscribers: klimek, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D38882 llvm-svn: 315898
* [clang-rename] Don't add prefix qualifiers to the declaration and definition ↵Haojian Wu2017-10-111-26/+49
| | | | | | | | | | | | | | of the renamed symbol. Reviewers: ioeric Reviewed By: ioeric Subscribers: klimek, cfe-commits, arphaman Differential Revision: https://reviews.llvm.org/D38723 llvm-svn: 315452
* [rename] Introduce symbol occurrencesAlex Lorenz2017-08-141-13/+12
| | | | | | | | | | | Symbol occurrences store the results of local rename and will also be used for the global, indexed rename results. Their kind is used to determine whether they should be renamed automatically or not. They can be converted to a set of AtomicChanges as well. Differential Revision: https://reviews.llvm.org/D36156 llvm-svn: 310853
* [refactor][rename] Use a single base class for class that findsAlex Lorenz2017-07-131-74/+16
| | | | | | | | | | | | | | a declaration at location and for class that searches for all occurrences of a specific declaration This commit uses a single RecursiveSymbolVisitor class for both USRLocFindingASTVisitor and NamedDeclOccurrenceFindingVisitor to avoid duplicate traversal code. It also traverses nested name specifier locs in the new class and remove the separate matching step. Differential Revision: https://reviews.llvm.org/D34949 llvm-svn: 307898
* [refactor] Move clang-rename into the clang repositoryAlex Lorenz2017-06-301-0/+509
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
OpenPOWER on IntegriCloud