ilya-biryukov added a comment.

In D67536#1700872 <https://reviews.llvm.org/D67536#1700872>, @nridge wrote:

> > It also lets them consistently highlight part of the line (e.g. dead 
> > expressions or statements can be marked in gray even if they are on the 
> > same line).
>
> Highlighting part of a line is not applicable to inactive preprocessor 
> branches in C++.


Note that the opposite is true - inactive preprocessor branches can be 
expressed as range-based highlightings.

> If we later introduce highlightings for dead expressions or statements, we 
> can of course use character ranges and not lines for them.

Then we'll have two modes of operation - line-based and range-based 
highlightings. Clients will have to support both, we'll have code dealing with 
both.
The alternative is having only range-based highlightings and using them 
everywhere. That's the main reason I would advocate for range-based.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67536/new/

https://reviews.llvm.org/D67536



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to