summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/TextDiagnosticPrinter.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-10-15 12:07:49 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-10-15 12:07:49 +0000
commitc9b1c180ff95f62119c2a16733e9621b3ccbc906 (patch)
tree9e0ea759d3c8f2c390f5c8c478c00fd8fef0ab3c /clang/lib/Frontend/TextDiagnosticPrinter.cpp
parent636b2501bbe97472ba348892e69f19e4ef2da6c8 (diff)
downloadbcm5719-llvm-c9b1c180ff95f62119c2a16733e9621b3ccbc906.tar.gz
bcm5719-llvm-c9b1c180ff95f62119c2a16733e9621b3ccbc906.zip
Nuke a bunch of FIXMEs that are now fixed. =] Also, remove the now-dead
TextDiagnosticPrinter argument to the TextDiagnostic helper class. This cements the proper ordering of things: TextDiagnostic is now a viable stand-alone class for emitting pretty-printed textual diagnostics to a terminal. llvm-svn: 142070
Diffstat (limited to 'clang/lib/Frontend/TextDiagnosticPrinter.cpp')
-rw-r--r--clang/lib/Frontend/TextDiagnosticPrinter.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/clang/lib/Frontend/TextDiagnosticPrinter.cpp b/clang/lib/Frontend/TextDiagnosticPrinter.cpp
index 1716471cd14..0afc3efbbcd 100644
--- a/clang/lib/Frontend/TextDiagnosticPrinter.cpp
+++ b/clang/lib/Frontend/TextDiagnosticPrinter.cpp
@@ -477,13 +477,9 @@ namespace {
/// printing coming out of libclang.
///
/// A brief worklist:
-/// FIXME: Sink the printing of the diagnostic message itself into this class.
-/// FIXME: Sink the printing of the include stack into this class.
-/// FIXME: Remove the TextDiagnosticPrinter as an input.
/// FIXME: Sink the recursive printing of template instantiations into this
/// class.
class TextDiagnostic {
- TextDiagnosticPrinter &Printer;
raw_ostream &OS;
const SourceManager &SM;
const LangOptions &LangOpts;
@@ -502,14 +498,13 @@ class TextDiagnostic {
SourceLocation LastNonNoteLoc;
public:
- TextDiagnostic(TextDiagnosticPrinter &Printer,
- raw_ostream &OS,
+ TextDiagnostic(raw_ostream &OS,
const SourceManager &SM,
const LangOptions &LangOpts,
const DiagnosticOptions &DiagOpts,
FullSourceLoc LastLoc = FullSourceLoc(),
FullSourceLoc LastNonNoteLoc = FullSourceLoc())
- : Printer(Printer), OS(OS), SM(SM), LangOpts(LangOpts), DiagOpts(DiagOpts),
+ : OS(OS), SM(SM), LangOpts(LangOpts), DiagOpts(DiagOpts),
LastLoc(LastLoc), LastNonNoteLoc(LastNonNoteLoc) {
if (LastLoc.isValid() && &SM != &LastLoc.getManager())
this->LastLoc = SourceLocation();
@@ -1282,7 +1277,7 @@ void TextDiagnosticPrinter::HandleDiagnostic(DiagnosticsEngine::Level Level,
assert(Info.hasSourceManager() &&
"Unexpected diagnostic with no source manager");
const SourceManager &SM = Info.getSourceManager();
- TextDiagnostic TextDiag(*this, OS, SM, *LangOpts, *DiagOpts,
+ TextDiagnostic TextDiag(OS, SM, *LangOpts, *DiagOpts,
LastLoc, LastNonNoteLoc);
TextDiag.Emit(Info.getLocation(), Level, DiagMessageStream.str(),
OpenPOWER on IntegriCloud