clang API Documentation

Public Member Functions
clang::PluginASTAction Class Reference

#include <FrontendAction.h>

Inheritance diagram for clang::PluginASTAction:
Inheritance graph
[legend]
Collaboration diagram for clang::PluginASTAction:
Collaboration graph
[legend]

List of all members.

Public Member Functions

std::unique_ptr< ASTConsumerCreateASTConsumer (CompilerInstance &CI, StringRef InFile) override=0
 Create the AST consumer object for this action, if supported.
virtual bool ParseArgs (const CompilerInstance &CI, const std::vector< std::string > &arg)=0
 Parse the given plugin command line arguments.

Detailed Description

Definition at line 238 of file FrontendAction.h.


Member Function Documentation

std::unique_ptr<ASTConsumer> clang::PluginASTAction::CreateASTConsumer ( CompilerInstance CI,
StringRef  InFile 
) [override, pure virtual]

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.

Parameters:
CI- The current compiler instance, provided as a convenience, see getCompilerInstance().
InFile- The current input file, provided as a convenience, see getCurrentFile().
Returns:
The new AST consumer, or null on failure.

Implements clang::FrontendAction.

virtual bool clang::PluginASTAction::ParseArgs ( const CompilerInstance CI,
const std::vector< std::string > &  arg 
) [pure virtual]

Parse the given plugin command line arguments.

Parameters:
CI- The compiler instance, for use in reporting diagnostics.
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.

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