diff --git a/clang/lib/Frontend/TextDiagnosticPrinter.cpp b/clang/lib/Frontend/TextDiagnosticPrinter.cpp index 0c0a44a1388b..9feb3c64039f 100644 --- a/clang/lib/Frontend/TextDiagnosticPrinter.cpp +++ b/clang/lib/Frontend/TextDiagnosticPrinter.cpp @@ -135,10 +135,10 @@ void TextDiagnosticPrinter::HandleDiagnostic(DiagnosticsEngine::Level Level, if (!Info.getLocation().isValid()) { TextDiagnostic::printDiagnosticLevel(OS, Level, DiagOpts->ShowColors, DiagOpts->CLFallbackMode); - TextDiagnostic::printDiagnosticMessage(OS, Level, DiagMessageStream.str(), - OS.tell() - StartOfLocationInfo, - DiagOpts->MessageLength, - DiagOpts->ShowColors); + TextDiagnostic::printDiagnosticMessage( + OS, /*IsSupplemental=*/Level == DiagnosticsEngine::Note, + DiagMessageStream.str(), OS.tell() - StartOfLocationInfo, + DiagOpts->MessageLength, DiagOpts->ShowColors); OS.flush(); return; }