[clang] [clang-tools-extra] [clangd] Add an explicit `IsCachingLexMode` flag to fix preprocessor caching-lexer state tracking (PR #203716)
Corentin Jabot via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 23 04:24:21 PDT 2026
================
@@ -1190,6 +1190,9 @@ class Preprocessor {
/// Lex() should be invoked.
CachedTokensTy::size_type CachedLexPos = 0;
+ /// True when the caching lexer is installed as the active lexer layer.
+ bool IsCachingLexMode = false;
+
----------------
cor3ntin wrote:
Can we just test `CurLexerCallback == CLK_CachingLexer` instead of adding new state?
https://github.com/llvm/llvm-project/pull/203716
More information about the cfe-commits
mailing list