[clang] [clang][Diagnostics] Fix check-point recording under default colors (PR #209355)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 13 19:13:32 PDT 2026
https://github.com/AnonMiraj created https://github.com/llvm/llvm-project/pull/209355
`getShowColors() != ShowColorsKind::Off` is also true for the default Auto, so ordinary non-TTY compiles where colors are never actually emitted kept recording check points, leaving the original 718aac9f cost in place.
>From e2a57c5ff2cbf653d478e1b3ec5404b584d6c3bb Mon Sep 17 00:00:00 2001
From: Anonmiraj <ezzibrahimx at gmail.com>
Date: Tue, 14 Jul 2026 04:59:50 +0300
Subject: [PATCH] [clang][Diagnostics] Fix check-point recording under default
colors
---
clang/lib/Lex/Preprocessor.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp
index 5ee53a93732bb..427a3826b299a 100644
--- a/clang/lib/Lex/Preprocessor.cpp
+++ b/clang/lib/Lex/Preprocessor.cpp
@@ -103,8 +103,7 @@ Preprocessor::Preprocessor(const PreprocessorOptions &PPOpts,
OwnsHeaderSearch = OwnsHeaders;
// Only record check points if we might highlight diagnostic snippets.
- RecordCheckPoints = getDiagnostics().getDiagnosticOptions().getShowColors() !=
- ShowColorsKind::Off;
+ RecordCheckPoints = getDiagnostics().getShowColors();
// Default to discarding comments.
KeepComments = false;
More information about the cfe-commits
mailing list