[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 15 04:39:25 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>
================
@@ -878,6 +878,25 @@ bool Preprocessor::HandleIdentifier(Token &Identifier) {
return true;
}
+void Preprocessor::saveCheckPoint(const char *P) {
+ static constexpr ptrdiff_t Limit = 1024 * 8;
+ if (CheckPoints.empty()) {
+ CheckPoints.push_back(P);
+ return;
+ }
+
+ const char *Cur = CheckPoints.back();
+ if (Cur == P)
+ return;
----------------
cor3ntin wrote:
can this actually happen? Should it be an assert instead?
https://github.com/llvm/llvm-project/pull/66514
More information about the cfe-commits
mailing list