clang API Documentation
#include <FrontendActions.h>
Public Member Functions | |
FixItAction () | |
~FixItAction () | |
Protected Member Functions | |
std::unique_ptr< ASTConsumer > | CreateASTConsumer (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< FixItRewriter > | Rewriter |
std::unique_ptr< FixItOptions > | FixItOpts |
Definition at line 29 of file Rewrite/Frontend/FrontendActions.h.
Definition at line 40 of file Frontend/Rewrite/FrontendActions.cpp.
Definition at line 41 of file Frontend/Rewrite/FrontendActions.cpp.
bool FixItAction::BeginSourceFileAction | ( | CompilerInstance & | CI, |
StringRef | Filename | ||
) | [override, protected, virtual] |
Callback at the start of processing a single input.
Reimplemented from clang::FrontendAction.
Definition at line 87 of file Frontend/Rewrite/FrontendActions.cpp.
References FixItOpts, clang::FrontendOptions::FixItSuffix, clang::FrontendOptions::FixWhatYouCan, clang::FrontendAction::getCompilerInstance(), clang::CompilerInstance::getDiagnostics(), clang::CompilerInstance::getFrontendOpts(), clang::CompilerInstance::getLangOpts(), and clang::CompilerInstance::getSourceManager().
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.
CI | - The current compiler instance, provided as a convenience, see getCompilerInstance(). |
InFile | - The current input file, provided as a convenience, see getCurrentFile(). |
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.
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.