llvm-project/clang/lib/Tooling
Peter Collingbourne c689ee76d4 Introduce ClangTool::buildASTs, and buildASTFromCode.
These allow clients to retrieve persistent AST objects (ASTUnits) which
can be used in an ad-hoc manner after parsing.

To accommodate this change, the code for processing a CompilerInvocation
using a FrontendAction has been factored out to FrontendActionFactory, and
a new base class, ToolAction, has been introduced, allowing the tool to do
arbitrary things with each CompilerInvocation.  This change was necessary
because ASTUnit does not use the FrontendAction interface directly.

This change also causes the FileManager in ClangTool to use shared ownership.
This will become necessary because ASTUnit takes shared ownership of
FileManager (ClangTool's FileManager is currently unused by ASTUnit; this
is a FIXME).  As shown in the tests, any client of ToolInvocation will
need to be modified to use shared ownership for FileManager.

Differential Revision: http://llvm-reviews.chandlerc.com/D2097

llvm-svn: 194164
2013-11-06 20:12:45 +00:00
..
ArgumentsAdjusters.cpp ClangTool: strip -o from the command line 2013-06-06 11:52:19 +00:00
CMakeLists.txt Support symlinks and relative paths in complilation databases. 2012-10-08 16:08:15 +00:00
CommonOptionsParser.cpp Allow clang tools to display an overview when using the CommonOptionsParser. 2013-07-19 12:20:59 +00:00
CompilationDatabase.cpp Remove useless 'llvm::' qualifier from names like StringRef and others that are 2013-01-12 19:30:44 +00:00
FileMatchTrie.cpp Include Path.h instead of PathV2.h. 2013-06-11 22:15:02 +00:00
JSONCompilationDatabase.cpp Put helper class in anonymous namespace. 2013-07-01 06:34:58 +00:00
Makefile Adds a tooling library. 2012-04-04 12:07:46 +00:00
Refactoring.cpp Use Rewriter::overwriteChangedFiles() directly 2013-10-29 08:32:41 +00:00
RefactoringCallbacks.cpp Finishing the move of RefactoringCallbacks and fixing the corresponding 2012-07-17 08:37:03 +00:00
Tooling.cpp Introduce ClangTool::buildASTs, and buildASTFromCode. 2013-11-06 20:12:45 +00:00