[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 16 20:30:30 PDT 2023
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <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;
----------------
tbaederr wrote:
Thinking about this some more, I think this was only happening when I tested with `Limit = 1`. I'll re-check.
https://github.com/llvm/llvm-project/pull/66514
More information about the cfe-commits
mailing list