clang 8.0.0

Public Member Functions | Protected Member Functions | List of all members
clang::FixItRecompile Class Reference

Emits changes to temporary files and uses them for the original frontend action. More...

`#include "clang/Rewrite/Frontend/FrontendActions.h"`

Inheritance diagram for clang::FixItRecompile:
[legend]
Collaboration diagram for clang::FixItRecompile:
[legend]

## Public Member Functions
| FixItRecompile (std::unique_ptr< FrontendAction > WrappedAction)
Public Member Functions inherited from clang::WrapperFrontendAction
| WrapperFrontendAction (std::unique_ptr< FrontendAction > WrappedAction)
| Construct a WrapperFrontendAction from an existing action, taking ownership of it. More...
bool | usesPreprocessorOnly () const override
| Does this action only use the preprocessor? More...
TranslationUnitKind | getTranslationUnitKind () override
| For AST-based actions, the kind of translation unit we're handling. More...
bool | hasPCHSupport () const override
| Does this action support use with PCH? More...
bool | hasASTFileSupport () const override
| Does this action support use with AST files? More...
bool | hasIRSupport () const override
| Does this action support use with IR files? More...
bool | hasCodeCompletionSupport () const override
| Does this action support use with code completion? More...
Public Member Functions inherited from clang::FrontendAction
| FrontendAction ()
virtual | ~FrontendAction ()
CompilerInstance & | getCompilerInstance () const
void | setCompilerInstance (CompilerInstance *Value)
bool | isCurrentFileAST () const
const FrontendInputFile & | getCurrentInput () const
StringRef | getCurrentFile () const
StringRef | getCurrentFileOrBufferName () const
InputKind | getCurrentFileKind () const
ASTUnit & | getCurrentASTUnit () const
Module * | getCurrentModule () const
std::unique_ptr< ASTUnit > | takeCurrentASTUnit ()
void | setCurrentInput (const FrontendInputFile &CurrentInput, std::unique_ptr< ASTUnit > AST=nullptr)
virtual bool | isModelParsingAction () const
| Is this action invoked on a model file? More...
bool | PrepareToExecute (CompilerInstance &CI)
| Prepare the action to execute on the given compiler instance. More...
bool | BeginSourceFile (CompilerInstance &CI, const FrontendInputFile &Input)
| Prepare the action for processing the input file `Input`. More...
bool | Execute ()
| Set the source manager's main input file, and run the action. More...
void | EndSourceFile ()
| Perform any per-file post processing, deallocate per-file objects, and run statistics and output file cleanup code. More...

## Protected Member Functions
bool | BeginInvocation (CompilerInstance &CI) override
| Callback before starting processing a single input, giving the opportunity to modify the CompilerInvocation or do some other action before BeginSourceFileAction is called. More...
Protected Member Functions inherited from clang::WrapperFrontendAction
std::unique_ptr< ASTConsumer > | CreateASTConsumer (CompilerInstance &CI, StringRef InFile) override
| Create the AST consumer object for this action, if supported. More...
bool | BeginSourceFileAction (CompilerInstance &CI) override
| Callback at the start of processing a single input. More...
void | ExecuteAction () override
| Callback to run the program action, using the initialized compiler instance. More...
void | EndSourceFileAction () override
| Callback at the end of processing a single input. More...
Protected Member Functions inherited from clang::FrontendAction
virtual bool | PrepareToExecuteAction (CompilerInstance &CI)
| Prepare to execute the action on the given CompilerInstance. More...
virtual bool | shouldEraseOutputFiles ()
| Callback at the end of processing a single input, to determine if the output files should be erased or not. More...

## Detailed Description

Emits changes to temporary files and uses them for the original frontend action.

Definition at line 51 of file FrontendActions.h.

## Constructor & Destructor Documentation

## ◆ FixItRecompile()

clang::FixItRecompile::FixItRecompile | ( | std::unique_ptr< FrontendAction > | WrappedAction | ) |
| inline

Definition at line 53 of file FrontendActions.h.

References clang::FrontendAction::BeginInvocation().

## Member Function Documentation

## ◆ BeginInvocation()

bool FixItRecompile::BeginInvocation | ( | CompilerInstance & | CI | ) |
| override protected virtual

Callback before starting processing a single input, giving the opportunity to modify the CompilerInvocation or do some other action before BeginSourceFileAction is called.

Returns
  True on success; on failure BeginSourceFileAction(), ExecuteAction() and EndSourceFileAction() will not be called.

Reimplemented from clang::WrapperFrontendAction.

Definition at line 115 of file FrontendActions.cpp.

References clang::DiagnosticConsumer::clear(), clang::FrontendOptions::FixOnlyWarnings, clang::FrontendOptions::FixToTemporaries, clang::FrontendOptions::FixWhatYouCan, clang::CompilerInstance::getDiagnosticClient(), clang::CompilerInstance::getDiagnostics(), clang::CompilerInstance::getFrontendOpts(), clang::CompilerInstance::getLangOpts(), clang::CompilerInstance::getPreprocessorOpts(), clang::CompilerInstance::getSourceManager(), clang::FrontendOptions::Inputs, clang::PreprocessorOptions::RemappedFiles, clang::PreprocessorOptions::RemappedFilesKeepOriginalName, clang::DiagnosticsEngine::Reset(), clang::CompilerInstance::setFileManager(), and clang::CompilerInstance::setSourceManager().

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

- include/clang/Rewrite/Frontend/FrontendActions.h
- lib/Frontend/Rewrite/FrontendActions.cpp