clang API Documentation

Public Member Functions | Protected Member Functions | Protected Attributes
clang::FixItAction Class Reference

#include <FrontendActions.h>

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

List of all members.

Public Member Functions

 FixItAction ()
 ~FixItAction ()

Protected Member Functions

std::unique_ptr< ASTConsumerCreateASTConsumer (CompilerInstance &CI, StringRef InFile) override
 Create the AST consumer object for this action, if supported.
bool BeginSourceFileAction (CompilerInstance &CI, StringRef Filename) override
 Callback at the start of processing a single input.
void EndSourceFileAction () override
 Callback at the end of processing a single input.
bool hasASTFileSupport () const override
 Does this action support use with AST files?

Protected Attributes

std::unique_ptr< FixItRewriterRewriter
std::unique_ptr< FixItOptionsFixItOpts

Detailed Description

Definition at line 29 of file Rewrite/Frontend/FrontendActions.h.


Constructor & Destructor Documentation

Definition at line 40 of file Frontend/Rewrite/FrontendActions.cpp.

Definition at line 41 of file Frontend/Rewrite/FrontendActions.cpp.


Member Function Documentation

bool FixItAction::BeginSourceFileAction ( CompilerInstance CI,
StringRef  Filename 
) [override, protected, virtual]
std::unique_ptr< ASTConsumer > FixItAction::CreateASTConsumer ( CompilerInstance CI,
StringRef  InFile 
) [override, protected, 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.

Definition at line 44 of file Frontend/Rewrite/FrontendActions.cpp.

void FixItAction::EndSourceFileAction ( ) [override, protected, virtual]

Callback at the end of processing a single input.

This is guaranteed to only be called following a successful call to BeginSourceFileAction (and BeginSourceFile).

Reimplemented from clang::FrontendAction.

Definition at line 102 of file Frontend/Rewrite/FrontendActions.cpp.

bool clang::FixItAction::hasASTFileSupport ( ) const [inline, override, protected, virtual]

Does this action support use with AST files?

Reimplemented from clang::FrontendAction.

Definition at line 42 of file Rewrite/Frontend/FrontendActions.h.


Member Data Documentation

std::unique_ptr<FixItOptions> clang::FixItAction::FixItOpts [protected]

Definition at line 32 of file Rewrite/Frontend/FrontendActions.h.

Referenced by BeginSourceFileAction().

std::unique_ptr<FixItRewriter> clang::FixItAction::Rewriter [protected]

Definition at line 31 of file Rewrite/Frontend/FrontendActions.h.


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