llvm-project/clang/unittests
Eric Liu 826b783214 [Tooling] A new framework for executing clang frontend actions.
Summary:
This defines a `clang::tooling::ToolExecutor` interface that can be extended to support different execution plans including standalone execution on a given set of TUs or parallel execution on all TUs in a codebase.

In order to enable multiprocessing execution, tool actions are expected to output result into a `ToolResults` interface provided by executors. The `ToolResults` interface abstracts how results are stored e.g. in-memory for standalone executions or on-disk for large-scale execution.

New executors can be registered as `ToolExecutorPlugin`s via the `ToolExecutorPluginRegistry`. CLI tools can use `createExecutorFromCommandLineArgs` to create a specific registered executor according to the command-line arguments.

This patch also implements `StandaloneToolExecutor` which has the same behavior as the current `ClangTool` interface, i.e. execute frontend actions on a given set of TUs. At this point, it's simply a wrapper around `ClangTool` at this point.

This is still experimental but expected to replace the existing `ClangTool` interface so that specific tools would not need to worry about execution.

Reviewers: klimek, arphaman, hokein, sammccall

Reviewed By: klimek

Subscribers: cfe-commits, djasper, mgorny, omtcyfz

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

llvm-svn: 316653
2017-10-26 10:38:14 +00:00
..
AST Allow StmtPrinter to supress implicit 'this' and 'self' base expressions 2017-10-26 00:56:54 +00:00
ASTMatchers Add objcImplementationDecl matcher 2017-09-10 21:00:15 +00:00
Analysis [analyzer] Performance optimizations for the CloneChecker 2017-08-31 07:10:46 +00:00
Basic [Basic] Add a DiagnosticError llvm::ErrorInfo subclass 2017-08-25 15:48:00 +00:00
CodeGen Reorder. 2017-10-11 04:54:05 +00:00
CrossTU Commit missing fixes for tool_file_rename 2017-09-23 01:04:42 +00:00
Driver Use class to pass information about executable name 2017-08-29 05:22:26 +00:00
Format [clang-format] Sort whole block of using declarations while partially formatting 2017-10-18 22:13:25 +00:00
Frontend Recommit r315738 "[clang-refactor] Apply source replacements" 2017-10-16 17:31:16 +00:00
Lex [Lex] Avoid out-of-bounds dereference in SkipLineComment 2017-10-14 01:18:30 +00:00
Rename [rename] support renaming class member. 2017-10-25 11:54:45 +00:00
Rewrite Remove autoconf support 2016-01-26 21:30:40 +00:00
Sema [Sema] Allow an external sema source to handle delayed typo corrections. 2016-05-19 10:46:10 +00:00
StaticAnalyzer Add a method to get the list of registered static analyzer checkers. 2016-11-08 07:23:32 +00:00
Tooling [Tooling] A new framework for executing clang frontend actions. 2017-10-26 10:38:14 +00:00
libclang Fixed more signed/unsigned mismatch warnings introduced in my change at r279076 2016-08-18 20:56:48 +00:00
CMakeLists.txt Add Cross Translation Unit support library 2017-09-22 11:11:01 +00:00