[clang] 918863d - [clang][Diagnostics] Make 'note' color CYAN (#66997)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 27 05:07:14 PDT 2023
Author: Timm Baeder
Date: 2023-09-27T14:07:10+02:00
New Revision: 918863deb0af1986de2df96ca6094eb625adafed
URL: https://github.com/llvm/llvm-project/commit/918863deb0af1986de2df96ca6094eb625adafed
DIFF: https://github.com/llvm/llvm-project/commit/918863deb0af1986de2df96ca6094eb625adafed.diff
LOG: [clang][Diagnostics] Make 'note' color CYAN (#66997)
Just using BLACK makes it invisible in terminals with a dark background.
Added:
Modified:
clang/docs/ReleaseNotes.rst
clang/lib/Frontend/TextDiagnostic.cpp
Removed:
################################################################################
diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index a17efab57bcdfa3..fb52b90ae4a3cb9 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -212,6 +212,8 @@ Improvements to Clang's diagnostics
(`#51567: <https://github.com/llvm/llvm-project/issues/51567>`_)
- Clang now diagnoses narrowing implicit conversions on variable initializers in immediate
function context and on constexpr variable template initializers.
+- Clang now prints its 'note' diagnostic in cyan instead of black, to be more compatible
+ with terminals with dark background colors. This is also more consistent with GCC.
Bug Fixes in This Version
-------------------------
diff --git a/clang/lib/Frontend/TextDiagnostic.cpp b/clang/lib/Frontend/TextDiagnostic.cpp
index eaa6e8d29a1dece..779dead5d058d1a 100644
--- a/clang/lib/Frontend/TextDiagnostic.cpp
+++ b/clang/lib/Frontend/TextDiagnostic.cpp
@@ -24,8 +24,7 @@
using namespace clang;
-static const enum raw_ostream::Colors noteColor =
- raw_ostream::BLACK;
+static const enum raw_ostream::Colors noteColor = raw_ostream::CYAN;
static const enum raw_ostream::Colors remarkColor =
raw_ostream::BLUE;
static const enum raw_ostream::Colors fixitColor =
More information about the cfe-commits
mailing list