[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 15 07:11:22 PDT 2023
Timm =?utf-8?q?B=C3=A4der?= <tbaeder at redhat.com>,
Timm =?utf-8?q?B=C3=A4der?= <tbaeder at redhat.com>,
Timm =?utf-8?q?B=C3=A4der?= <tbaeder at redhat.com>,
Timm =?utf-8?q?B=C3=A4der?= <tbaeder at redhat.com>,
Timm =?utf-8?q?B=C3=A4der?= <tbaeder at redhat.com>,
Timm =?utf-8?q?B=C3=A4der?= <tbaeder at redhat.com>,
Timm =?utf-8?q?B=C3=A4der?= <tbaeder at redhat.com>,
Timm =?utf-8?q?B=C3=A4der?= <tbaeder at redhat.com>,
Timm =?utf-8?q?B=C3=A4der?= <tbaeder at redhat.com>,
Timm =?utf-8?q?B=C3=A4der?= <tbaeder at redhat.com>,
Timm =?utf-8?q?B=C3=A4der?= <tbaeder at redhat.com>,
Timm =?utf-8?q?B=C3=A4der?= <tbaeder at redhat.com>
Message-ID:
In-Reply-To: <llvm/llvm-project/pull/66514/clang at github.com>
================
@@ -887,6 +906,9 @@ void Preprocessor::Lex(Token &Result) {
switch (CurLexerKind) {
case CLK_Lexer:
ReturnedToken = CurLexer->Lex(Result);
+ if (ReturnedToken && CurLexer &&
+ CurLexer->getFileID() == SourceMgr.getMainFileID())
+ saveCheckPoint(CurLexer->BufferPtr);
----------------
tbaederr wrote:
The check for `CurLexer` is needed in case the call to `Lex` above unsets it.
https://github.com/llvm/llvm-project/pull/66514
More information about the cfe-commits
mailing list