llvmorg-github-actions[bot] wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Anonmiraj (AnonMiraj)

<details>
<summary>Changes</summary>

`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.


---
Full diff: https://github.com/llvm/llvm-project/pull/209355.diff


1 Files Affected:

- (modified) clang/lib/Lex/Preprocessor.cpp (+1-2) 


``````````diff
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;

``````````

</details>


https://github.com/llvm/llvm-project/pull/209355
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to