[clang] 367d196 - [clang][Diagnostics] Fix check-point recording under default colors (#209355)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 14 04:27:02 PDT 2026
Author: Anonmiraj
Date: 2026-07-14T14:26:57+03:00
New Revision: 367d196e5cf964a1d89d596e13c89868da8c4d8c
URL: https://github.com/llvm/llvm-project/commit/367d196e5cf964a1d89d596e13c89868da8c4d8c
DIFF: https://github.com/llvm/llvm-project/commit/367d196e5cf964a1d89d596e13c89868da8c4d8c.diff
LOG: [clang][Diagnostics] Fix check-point recording under default colors (#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.
Added:
Modified:
clang/lib/Lex/Preprocessor.cpp
Removed:
################################################################################
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