[cfe-commits] r142070 - /cfe/trunk/lib/Frontend/TextDiagnosticPrinter.cpp

Chandler Carruth chandlerc at gmail.com
Sat Oct 15 05:07:50 PDT 2011


Author: chandlerc
Date: Sat Oct 15 07:07:49 2011
New Revision: 142070

URL: http://llvm.org/viewvc/llvm-project?rev=142070&view=rev
Log:
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.

Modified:
    cfe/trunk/lib/Frontend/TextDiagnosticPrinter.cpp

Modified: cfe/trunk/lib/Frontend/TextDiagnosticPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/TextDiagnosticPrinter.cpp?rev=142070&r1=142069&r2=142070&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/TextDiagnosticPrinter.cpp (original)
+++ cfe/trunk/lib/Frontend/TextDiagnosticPrinter.cpp Sat Oct 15 07:07:49 2011
@@ -477,13 +477,9 @@
 /// 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 @@
   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 @@
   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(),





More information about the cfe-commits mailing list