clang API Documentation
Interface to generate clang::FrontendActions. More...
#include <Tooling.h>


Public Member Functions | |
| virtual | ~FrontendActionFactory () |
| bool | runInvocation (clang::CompilerInvocation *Invocation, FileManager *Files, DiagnosticConsumer *DiagConsumer) override |
| Invokes the compiler with a FrontendAction created by create(). | |
| virtual clang::FrontendAction * | create ()=0 |
| Returns a new clang::FrontendAction. | |
Interface to generate clang::FrontendActions.
Having a factory interface allows, for example, a new FrontendAction to be created for each translation unit processed by ClangTool. This class is also a ToolAction which uses the FrontendActions created by create() to process each translation unit.
Definition at line 48 of file Tooling.cpp.
| virtual clang::FrontendAction* clang::tooling::FrontendActionFactory::create | ( | ) | [pure virtual] |
Returns a new clang::FrontendAction.
The caller takes ownership of the returned action.
Referenced by runInvocation().
| bool clang::tooling::FrontendActionFactory::runInvocation | ( | clang::CompilerInvocation * | Invocation, |
| FileManager * | Files, | ||
| DiagnosticConsumer * | DiagConsumer | ||
| ) | [override, virtual] |
Invokes the compiler with a FrontendAction created by create().
Implements clang::tooling::ToolAction.
Definition at line 244 of file Tooling.cpp.
References clang::FileManager::clearStatCaches(), create(), clang::CompilerInstance::createDiagnostics(), clang::CompilerInstance::createSourceManager(), clang::CompilerInstance::ExecuteAction(), clang::CompilerInstance::hasDiagnostics(), clang::CompilerInstance::setFileManager(), clang::CompilerInstance::setInvocation(), and clang::format::Success.