15 #ifndef LLVM_CLANG_REWRITE_FRONTEND_FIXITREWRITER_H
16 #define LLVM_CLANG_REWRITE_FRONTEND_FIXITREWRITER_H
73 std::unique_ptr<DiagnosticConsumer> Owner;
83 bool PrevDiagSilenced;
113 std::vector<std::pair<std::string, std::string> > *RewrittenFiles=
nullptr);
const RewriteBuffer * getRewriteBufferFor(FileID FID) const
getRewriteBufferFor - Return the rewrite buffer for the specified FileID.
bool WriteFixedFiles(std::vector< std::pair< std::string, std::string > > *RewrittenFiles=nullptr)
Write the modified source files.
bool FixOnlyWarnings
Whether to only fix warnings and not errors.
Abstract interface, implemented by clients of the front-end, which formats and prints fully processed...
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
bool Silent
If true, only pass the diagnostic to the actual diagnostic consumer if it is an error or a fixit was ...
Concrete class used by the front-end to report problems and issues.
~FixItRewriter() override
Destroy the fix-it rewriter.
buffer_iterator buffer_end()
bool WriteFixedFile(FileID ID, raw_ostream &OS)
Write a single modified source file.
FixItRewriter(DiagnosticsEngine &Diags, SourceManager &SourceMgr, const LangOptions &LangOpts, FixItOptions *FixItOpts)
Initialize a new fix-it rewriter.
Encodes a location in the source.
bool FixWhatYouCan
Whether to abort fixing a file when not all errors could be fixed.
void HandleDiagnostic(DiagnosticsEngine::Level DiagLevel, const Diagnostic &Info) override
HandleDiagnostic - Handle this diagnostic, reporting it to the user or capturing it to a log as neede...
An opaque identifier used by SourceManager which refers to a source file (MemoryBuffer) along with it...
Rewriter::buffer_iterator iterator
Defines the Diagnostic-related interfaces.
void Diag(SourceLocation Loc, unsigned DiagID)
Emit a diagnostic via the adapted diagnostic client.
bool IsModified(FileID ID) const
Check whether there are modifications for a given file.
std::map< FileID, RewriteBuffer >::iterator buffer_iterator
buffer_iterator buffer_begin()
Rewriter - This is the main interface to the rewrite buffers.
Defines the clang::SourceLocation class and associated facilities.
Level
The level of the diagnostic, after it has been through mapping.
virtual std::string RewriteFilename(const std::string &Filename, int &fd)=0
This file is about to be rewritten.
A little helper class (which is basically a smart pointer that forwards info from DiagnosticsEngine) ...
bool InPlace
True if files should be updated in place.
This class handles loading and caching of source files into memory.
bool IncludeInDiagnosticCounts() const override
IncludeInDiagnosticCounts - This method (whose default implementation returns true) indicates whether...