[clang] [llvm] [clang] Use a formatted_raw_ostream in TextDiagnostic (PR #164935)

via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 27 09:14:43 PDT 2025


Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/164935 at github.com>


================
@@ -688,11 +690,21 @@ TextDiagnostic::printDiagnosticLevel(raw_ostream &OS,
     switch (Level) {
     case DiagnosticsEngine::Ignored:
       llvm_unreachable("Invalid diagnostic type");
-    case DiagnosticsEngine::Note:    OS.changeColor(noteColor, true); break;
-    case DiagnosticsEngine::Remark:  OS.changeColor(remarkColor, true); break;
-    case DiagnosticsEngine::Warning: OS.changeColor(warningColor, true); break;
-    case DiagnosticsEngine::Error:   OS.changeColor(errorColor, true); break;
-    case DiagnosticsEngine::Fatal:   OS.changeColor(fatalColor, true); break;
+    case DiagnosticsEngine::Note:
+      OS.changeColor(noteColor, true);
+      break;
+    case DiagnosticsEngine::Remark:
+      OS.changeColor(remarkColor, true);
+      break;
+    case DiagnosticsEngine::Warning:
+      OS.changeColor(warningColor, true);
+      break;
+    case DiagnosticsEngine::Error:
+      OS.changeColor(errorColor, true);
+      break;
+    case DiagnosticsEngine::Fatal:
+      OS.changeColor(fatalColor, true);
+      break;
----------------
Sirraide wrote:

Now that we have that default parameter, I don’t think anything actually changed here, so these lines should just be reverted.

https://github.com/llvm/llvm-project/pull/164935


More information about the cfe-commits mailing list