hanchenye-llvm-project/clang-tools-extra
Benjamin Kramer b568d99dd7 [clang-rename] Prune away AST nodes more correctly and effectively when looking for a point
Due to the way the preprocessor works nodes can be half in a macro or a
different file. This means checking the file name of the start location
of a Decl is not a correct way of checking if the entire Decl is in that
file. Remove that flawed assumption and replace it with a more effective
check: If the point we're looking for is *inside* of the begin and end
location of a Decl, look inside.

This should make clang-rename more reliable (for example macro'd namespaces
threw it off before, as seen in the test case) and maybe a little faster
by pruning off more stuff that the RecursiveASTVisitor doesn't have to
drill into.

llvm-svn: 287649
2016-11-22 17:29:45 +00:00
..
change-namespace [change-namespace] handle constructor initializer: Derived : Base::Base() {} and added conflict detections 2016-11-16 16:54:53 +00:00
clang-apply-replacements [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
clang-move [clang-move] Fix not moving using-decls in global namespace in old.cc 2016-11-18 10:51:16 +00:00
clang-query [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
clang-rename [clang-rename] Prune away AST nodes more correctly and effectively when looking for a point 2016-11-22 17:29:45 +00:00
clang-reorder-fields [clang-rename] Fix handling of unchanged files 2016-09-17 17:08:47 +00:00
clang-tidy readability-redundant-declaration: Fix crash 2016-11-21 14:29:53 +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
docs [docs] Remove doubled spaces 2016-11-17 14:26:45 +00:00
include-fixer [include-fixer plugin] Make the plugin emit proper fixits in case multiple errors are found. 2016-11-21 15:28:50 +00:00
modularize Adapt to TraverseLambdaCapture interface change from D23204 2016-08-17 15:00:22 +00:00
pp-trace Fix Clang-tidy modernize-deprecated-headers warnings; other minor fixes. 2016-03-17 17:02:25 +00:00
test [clang-rename] Prune away AST nodes more correctly and effectively when looking for a point 2016-11-22 17:29:45 +00:00
tool-template [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
unittests [change-namespace] handle constructor initializer: Derived : Base::Base() {} and added conflict detections 2016-11-16 16:54:53 +00:00
.arcconfig Upgrade all the .arcconfigs to https. 2016-07-14 13:15:37 +00:00
.gitignore
CMakeLists.txt [clang-move] A prototype tool for moving class definition to new file. 2016-09-21 13:18:19 +00:00
CODE_OWNERS.TXT
LICENSE.TXT Update copyright year to 2016. 2016-03-30 22:38:47 +00:00
README.txt

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/