[PATCH] D67536: [WIP] [clangd] Add support for an inactive regions notification
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 9 02:01:48 PDT 2019
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.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the cfe-commits