Timm =?utf-8?q?Bäder?= <tbae...@redhat.com>,
Timm =?utf-8?q?Bäder?= <tbae...@redhat.com>,
Timm =?utf-8?q?Bäder?= <tbae...@redhat.com>,
Timm =?utf-8?q?Bäder?= <tbae...@redhat.com>,
Timm =?utf-8?q?Bäder?= <tbae...@redhat.com>
Message-ID:
In-Reply-To: <llvm/llvm-project/pull/66514/cl...@github.com>


tbaederr wrote:

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

Sure. Because of performance, memory usage or code complexity?

> 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.

So, my general procedure for diagnostics is that they shouldn't complicate the 
non-diagnostic code. And when we emit a diagnostic, performance is basically 
out the window anyway (printing to stdout is _slow_ and the way we emit code 
snippets is also slow, etc.)

For build servers, none of this matters since they don't colorize output at 
all, so this is really only interesting for actual developers who usually have 
a clean build (no diagnostics emitted at all), but want to have maximal 
usefulness of the ones they encounter while working on their project.


https://github.com/llvm/llvm-project/pull/66514
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to