class PluginASTAction
Declaration
class PluginASTAction : public ASTFrontendAction { /* full declaration omitted */ };
Description
Abstract base class to use for AST consumer-based frontend actions.
Declared at: clang/include/clang/Frontend/FrontendAction.h:257
Inherits from: ASTFrontendAction
Member Variables
Method Overview
- public std::unique_ptr<ASTConsumer> CreateASTConsumer(clang::CompilerInstance & CI, llvm::StringRef InFile)
- public virtual bool ParseArgs(const clang::CompilerInstance & CI, const std::vector<std::string> & arg)
- private virtual void anchor()
- public virtual clang::PluginASTAction::ActionType getActionType()
Inherited from ASTFrontendAction:
Inherited from FrontendAction:
- protected BeginInvocation
- public BeginSourceFile
- protected BeginSourceFileAction
- protected CreateASTConsumer
- public EndSourceFile
- protected EndSourceFileAction
- public Execute
- protected ExecuteAction
- public PrepareToExecute
- protected PrepareToExecuteAction
- public getCompilerInstance
- public getCurrentASTUnit
- public getCurrentFile
- public getCurrentFileKind
- public getCurrentFileOrBufferName
- public getCurrentInput
- public getCurrentModule
- public getTranslationUnitKind
- public hasASTFileSupport
- public hasCodeCompletionSupport
- public hasIRSupport
- public hasPCHSupport
- public isCurrentFileAST
- public isModelParsingAction
- public setCompilerInstance
- public setCurrentInput
- protected shouldEraseOutputFiles
- public takeCurrentASTUnit
- public usesPreprocessorOnly
Methods
¶std::unique_ptr<ASTConsumer> CreateASTConsumer(
clang::CompilerInstance& CI,
llvm::StringRef InFile)
std::unique_ptr<ASTConsumer> CreateASTConsumer(
clang::CompilerInstance& CI,
llvm::StringRef InFile)
Description
Create the AST consumer object for this action, if supported. This routine is called as part of BeginSourceFile(), which will fail if the AST consumer cannot be created. This will not be called if the action has indicated that it only uses the preprocessor.
Declared at: clang/include/clang/Frontend/FrontendAction.h:260
Parameters
- clang::CompilerInstance& CI
- - The current compiler instance, provided as a convenience, see getCompilerInstance().
- llvm::StringRef InFile
- - The current input file, provided as a convenience, see getCurrentFile().
Returns
The new AST consumer, or null on failure.
¶virtual bool ParseArgs(
const clang::CompilerInstance& CI,
const std::vector<std::string>& arg)
virtual bool ParseArgs(
const clang::CompilerInstance& CI,
const std::vector<std::string>& arg)
Description
Parse the given plugin command line arguments.
Declared at: clang/include/clang/Frontend/FrontendAction.h:269
Parameters
- const clang::CompilerInstance& CI
- - The compiler instance, for use in reporting diagnostics.
- const std::vector<std::string>& arg
Returns
True if the parsing succeeded; otherwise the plugin will be destroyed and no action run. The plugin is responsible for using the CompilerInstance's Diagnostic object to report errors.
¶virtual void anchor()
virtual void anchor()
Declared at: clang/include/clang/Frontend/FrontendAction.h:258
¶virtual clang::PluginASTAction::ActionType
getActionType()
virtual clang::PluginASTAction::ActionType
getActionType()
Description
Get the action type for this plugin
Declared at: clang/include/clang/Frontend/FrontendAction.h:284
Returns
The action type. By default we use CmdlineAfterMainAction.