diff options
Diffstat (limited to 'lib/Basic/Diagnostic.cpp')
-rw-r--r-- | lib/Basic/Diagnostic.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Basic/Diagnostic.cpp b/lib/Basic/Diagnostic.cpp index 519e835e32a2..f1ebd9d38b9e 100644 --- a/lib/Basic/Diagnostic.cpp +++ b/lib/Basic/Diagnostic.cpp @@ -116,12 +116,12 @@ void DiagnosticsEngine::Reset() { UncompilableErrorOccurred = false; FatalErrorOccurred = false; UnrecoverableErrorOccurred = false; - + NumWarnings = 0; NumErrors = 0; TrapNumErrorsOccurred = 0; TrapNumUnrecoverableErrorsOccurred = 0; - + CurDiagID = std::numeric_limits<unsigned>::max(); LastDiagLevel = DiagnosticIDs::Ignored; DelayedDiagID = 0; @@ -759,7 +759,7 @@ FormatDiagnostic(SmallVectorImpl<char> &OutStr) const { return; } - StringRef Diag = + StringRef Diag = getDiags()->getDiagnosticIDs()->getDescription(getID()); FormatDiagnostic(Diag.begin(), Diag.end(), OutStr); @@ -880,7 +880,7 @@ FormatDiagnostic(const char *DiagStr, const char *DiagEnd, continue; } } - + switch (Kind) { // ---- STRINGS ---- case DiagnosticsEngine::ak_std_string: { @@ -1056,7 +1056,7 @@ FormatDiagnostic(const char *DiagStr, const char *DiagEnd, break; } } - + // Remember this argument info for subsequent formatting operations. Turn // std::strings into a null terminated string to make it be the same case as // all the other ones. @@ -1077,7 +1077,7 @@ StoredDiagnostic::StoredDiagnostic(DiagnosticsEngine::Level Level, unsigned ID, StringRef Message) : ID(ID), Level(Level), Message(Message) {} -StoredDiagnostic::StoredDiagnostic(DiagnosticsEngine::Level Level, +StoredDiagnostic::StoredDiagnostic(DiagnosticsEngine::Level Level, const Diagnostic &Info) : ID(Info.getID()), Level(Level) { assert((Info.getLocation().isInvalid() || Info.hasSourceManager()) && |