16 #ifndef LLVM_CLANG_REWRITE_FRONTEND_FIXITREWRITER_H 17 #define LLVM_CLANG_REWRITE_FRONTEND_FIXITREWRITER_H 76 std::unique_ptr<DiagnosticConsumer> Owner;
83 unsigned NumFailures = 0;
86 bool PrevDiagSilenced =
false;
110 bool WriteFixedFile(
FileID ID, raw_ostream &OS);
115 bool WriteFixedFiles(
116 std::vector<std::pair<std::string, std::string>> *RewrittenFiles =
nullptr);
122 bool IncludeInDiagnosticCounts()
const override;
135 #endif // LLVM_CLANG_REWRITE_FRONTEND_FIXITREWRITER_H
static DiagnosticBuilder Diag(DiagnosticsEngine *Diags, const LangOptions &Features, FullSourceLoc TokLoc, const char *TokBegin, const char *TokRangeBegin, const char *TokRangeEnd, unsigned DiagID)
Produce a diagnostic highlighting some portion of a literal.
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 ...
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
Concrete class used by the front-end to report problems and issues.
Defines the Diagnostic-related interfaces.
buffer_iterator buffer_end()
Encodes a location in the source.
bool FixWhatYouCan
Whether to abort fixing a file when not all errors could be fixed.
const RewriteBuffer * getRewriteBufferFor(FileID FID) const
getRewriteBufferFor - Return the rewrite buffer for the specified FileID.
std::map< FileID, RewriteBuffer >::iterator buffer_iterator
An opaque identifier used by SourceManager which refers to a source file (MemoryBuffer) along with it...
Dataflow Directional Tag Classes.
Rewriter::buffer_iterator 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.
bool IsModified(FileID ID) const
Check whether there are modifications for a given file.
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.