[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 22 03:58:11 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>
Message-ID:
In-Reply-To: <llvm/llvm-project/pull/66514/clang at github.com>


cor3ntin wrote:

I have concerns about Lexing twice every single file for which we display a warning.

Did you try something along the lines of what Richard suggested? Keeping track of where lines start does seem like a good idea.

We could even keep track of ranges of good lines which would reduce even further how much state we need to keep in the lexer.

We can then parse starting from the nearest good line start. We could still cache that further if we wanted.

https://github.com/llvm/llvm-project/pull/66514


More information about the cfe-commits mailing list