class FrontendActionFactory

Declaration

class FrontendActionFactory : public ToolAction { /* full declaration omitted */ };

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.

Declared at: clang/include/clang/Tooling/Tooling.h:98

Inherits from: ToolAction

Method Overview

  • public virtual std::unique_ptr<FrontendAction> create()
  • public bool runInvocation(std::shared_ptr<CompilerInvocation> Invocation, clang::FileManager * Files, std::shared_ptr<PCHContainerOperations> PCHContainerOps, clang::DiagnosticConsumer * DiagConsumer)
  • public ~FrontendActionFactory()

Inherited from ToolAction:

Methods

virtual std::unique_ptr<FrontendAction> create()

Description

Returns a new clang::FrontendAction.

Declared at: clang/include/clang/Tooling/Tooling.h:109

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

Description

Invokes the compiler with a FrontendAction created by create().

Declared at: clang/include/clang/Tooling/Tooling.h:103

Parameters

std::shared_ptr<CompilerInvocation> Invocation
clang::FileManager* Files
std::shared_ptr<PCHContainerOperations> PCHContainerOps
clang::DiagnosticConsumer* DiagConsumer

~FrontendActionFactory()

Declared at: clang/include/clang/Tooling/Tooling.h:100