llvm-project/clang-tools-extra
Haojian Wu 74f823a045 [clang-rename] Support renaming qualified symbol
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
2017-04-04 09:30:06 +00:00
..
change-namespace [change-namespace] avoid adding leading '::' when possible. 2017-03-21 12:41:59 +00:00
clang-apply-replacements Update tools to use new getStyle API 2017-01-17 00:13:32 +00:00
clang-move [clang-move] Extend clang-move to support moving global variable. 2017-02-27 13:19:13 +00:00
clang-query modernize-use-auto NFC fixes 2016-12-14 15:29:23 +00:00
clang-rename [clang-rename] Support renaming qualified symbol 2017-04-04 09:30:06 +00:00
clang-reorder-fields [clang-rename] Fix handling of unchanged files 2016-09-17 17:08:47 +00:00
clang-tidy Fixes for modernize-use-using check: 2017-04-02 19:12:20 +00:00
clang-tidy-vs Remove 'misc-pointer-and-integral-operation' clang-tidy check. The only cases 2016-10-21 21:50:28 +00:00
clangd [clangd] Add support for vscode extension configuration 2017-03-24 09:29:00 +00:00
docs [clang-tidy] Correct code-block in the doc. 2017-03-31 07:55:22 +00:00
include-fixer Spelling mistakes in comments. NFCI. 2017-03-30 13:10:33 +00:00
modularize Fix memory leak by using unique_ptr 2017-02-11 05:25:21 +00:00
pp-trace modernize-use-auto NFC fixes 2016-12-14 15:29:23 +00:00
test Fixes for modernize-use-using check: 2017-04-02 19:12:20 +00:00
tool-template [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
unittests [clang-rename] Support renaming qualified symbol 2017-04-04 09:30:06 +00:00
.arcconfig Upgrade all the .arcconfigs to https. 2016-07-14 13:15:37 +00:00
.gitignore
CMakeLists.txt Add a prototype for clangd 2017-02-07 10:28:20 +00:00
CODE_OWNERS.TXT Updating the code owners list. 2015-09-02 20:00:41 +00:00
LICENSE.TXT Rename the clang-tidy safety module to be hicpp, for the High-Integrity C++ coding standard from PRQA. 2017-03-19 17:23:23 +00:00
README.txt Update references to new lists.llvm.org mailing lists. 2015-08-05 03:56:44 +00:00

README.txt

//===----------------------------------------------------------------------===//
// Clang Tools repository
//===----------------------------------------------------------------------===//

Welcome to the repository of extra Clang Tools.  This repository holds tools
that are developed as part of the LLVM compiler infrastructure project and the
Clang frontend.  These tools are kept in a separate "extra" repository to
allow lighter weight checkouts of the core Clang codebase.

This repository is only intended to be checked out inside of a full LLVM+Clang
tree, and in the 'tools/extra' subdirectory of the Clang checkout.

All discussion regarding Clang, Clang-based tools, and code in this repository
should be held using the standard Clang mailing lists:
  http://lists.llvm.org/mailman/listinfo/cfe-dev

Code review for this tree should take place on the standard Clang patch and
commit lists:
  http://lists.llvm.org/mailman/listinfo/cfe-commits

If you find a bug in these tools, please file it in the LLVM bug tracker:
  http://llvm.org/bugs/