]> granicus.if.org Git - clang/commit
[refactor] Add the AST source selection component
authorAlex Lorenz <arphaman@gmail.com>
Thu, 24 Aug 2017 13:51:09 +0000 (13:51 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Thu, 24 Aug 2017 13:51:09 +0000 (13:51 +0000)
commit898e66bf5e75fd71c358aa13b88d90ac5b5213bd
tree43b6e6640258acc74c56b962ed43f16ee02b2955
parent5cce8b32d1e5c32a60afc262c88dbecacf3986cc
[refactor] Add the AST source selection component

This commit adds the base AST source selection component to the refactoring
library. AST selection is represented using a tree of SelectedASTNode values.
Each selected node gets its own selection kind, which can actually be None even
in the middle of tree (e.g. statement in a macro whose child is in a macro
argument). The initial version constructs a "raw" selection tree, without
applying filters and canonicalisation operations to the nodes.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311655 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/LexicallyOrderedRecursiveASTVisitor.h [new file with mode: 0644]
include/clang/AST/RecursiveASTVisitor.h
include/clang/Basic/SourceLocation.h
include/clang/Basic/SourceManager.h
include/clang/Tooling/Refactoring/ASTSelection.h [new file with mode: 0644]
lib/Tooling/Refactoring/ASTSelection.cpp [new file with mode: 0644]
lib/Tooling/Refactoring/CMakeLists.txt
unittests/Tooling/ASTSelectionTest.cpp [new file with mode: 0644]
unittests/Tooling/CMakeLists.txt
unittests/Tooling/LexicallyOrderedRecursiveASTVisitorTest.cpp [new file with mode: 0644]