clang 22.0.0git
clang::tooling::FrontendActionFactory Class Referenceabstract

Interface to generate clang::FrontendActions. More...

#include "clang/Tooling/Tooling.h"

Inheritance diagram for clang::tooling::FrontendActionFactory:
[legend]

Public Member Functions

 ~FrontendActionFactory () override
bool runInvocation (std::shared_ptr< CompilerInvocation > Invocation, FileManager *Files, std::shared_ptr< PCHContainerOperations > PCHContainerOps, DiagnosticConsumer *DiagConsumer) override
 Invokes the compiler with a FrontendAction created by create().
virtual std::unique_ptr< FrontendActioncreate ()=0
 Returns a new clang::FrontendAction.
Public Member Functions inherited from clang::tooling::ToolAction
virtual ~ToolAction ()

Detailed Description

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 99 of file Tooling.h.

Constructor & Destructor Documentation

◆ ~FrontendActionFactory()

FrontendActionFactory::~FrontendActionFactory ( )
overridedefault

Member Function Documentation

◆ create()

virtual std::unique_ptr< FrontendAction > clang::tooling::FrontendActionFactory::create ( )
pure virtual

Returns a new clang::FrontendAction.

Referenced by runInvocation().

◆ runInvocation()

bool FrontendActionFactory::runInvocation ( std::shared_ptr< CompilerInvocation > Invocation,
FileManager * Files,
std::shared_ptr< PCHContainerOperations > PCHContainerOps,
DiagnosticConsumer * DiagConsumer )
overridevirtual

The documentation for this class was generated from the following files: