diff options
author | dim <dim@FreeBSD.org> | 2012-08-15 20:02:54 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-08-15 20:02:54 +0000 |
commit | 554bcb69c2d785a011a30e7db87a36a87fe7db10 (patch) | |
tree | 9abb1a658a297776086f4e0dfa6ca533de02104e /include/clang/Frontend/TextDiagnostic.h | |
parent | bb67ca86b31f67faee50bd10c3b036d65751745a (diff) | |
download | FreeBSD-src-554bcb69c2d785a011a30e7db87a36a87fe7db10.zip FreeBSD-src-554bcb69c2d785a011a30e7db87a36a87fe7db10.tar.gz |
Vendor import of clang trunk r161861:
http://llvm.org/svn/llvm-project/cfe/trunk@161861
Diffstat (limited to 'include/clang/Frontend/TextDiagnostic.h')
-rw-r--r-- | include/clang/Frontend/TextDiagnostic.h | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/include/clang/Frontend/TextDiagnostic.h b/include/clang/Frontend/TextDiagnostic.h index 314003b..c869c08 100644 --- a/include/clang/Frontend/TextDiagnostic.h +++ b/include/clang/Frontend/TextDiagnostic.h @@ -39,7 +39,6 @@ class TextDiagnostic : public DiagnosticRenderer { public: TextDiagnostic(raw_ostream &OS, - const SourceManager &SM, const LangOptions &LangOpts, const DiagnosticOptions &DiagOpts); @@ -60,7 +59,7 @@ public: /// /// This is a static helper to handle the line wrapping, colorizing, and /// rendering of a diagnostic message to a particular ostream. It is - /// publically visible so that clients which do not have sufficient state to + /// publicly visible so that clients which do not have sufficient state to /// build a complete TextDiagnostic object can still get consistent /// formatting of their diagnostic messages. /// @@ -83,39 +82,46 @@ protected: DiagnosticsEngine::Level Level, StringRef Message, ArrayRef<CharSourceRange> Ranges, + const SourceManager *SM, DiagOrStoredDiag D); virtual void emitDiagnosticLoc(SourceLocation Loc, PresumedLoc PLoc, DiagnosticsEngine::Level Level, - ArrayRef<CharSourceRange> Ranges); + ArrayRef<CharSourceRange> Ranges, + const SourceManager &SM); virtual void emitCodeContext(SourceLocation Loc, DiagnosticsEngine::Level Level, SmallVectorImpl<CharSourceRange>& Ranges, - ArrayRef<FixItHint> Hints) { - emitSnippetAndCaret(Loc, Level, Ranges, Hints); + ArrayRef<FixItHint> Hints, + const SourceManager &SM) { + emitSnippetAndCaret(Loc, Level, Ranges, Hints, SM); } virtual void emitBasicNote(StringRef Message); - virtual void emitIncludeLocation(SourceLocation Loc, PresumedLoc PLoc); + virtual void emitIncludeLocation(SourceLocation Loc, PresumedLoc PLoc, + const SourceManager &SM); private: void emitSnippetAndCaret(SourceLocation Loc, DiagnosticsEngine::Level Level, SmallVectorImpl<CharSourceRange>& Ranges, - ArrayRef<FixItHint> Hints); + ArrayRef<FixItHint> Hints, + const SourceManager &SM); void emitSnippet(StringRef SourceLine); void highlightRange(const CharSourceRange &R, unsigned LineNo, FileID FID, const SourceColumnMap &map, - std::string &CaretLine); + std::string &CaretLine, + const SourceManager &SM); std::string buildFixItInsertionLine(unsigned LineNo, const SourceColumnMap &map, - ArrayRef<FixItHint> Hints); - void emitParseableFixits(ArrayRef<FixItHint> Hints); + ArrayRef<FixItHint> Hints, + const SourceManager &SM); + void emitParseableFixits(ArrayRef<FixItHint> Hints, const SourceManager &SM); }; } // end namespace clang |