[PATCH] D66738: [clangd] Added highlighting for structured bindings.
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 30 03:15:09 PDT 2019
ilya-biryukov added a comment.
In D66738#1652285 <https://reviews.llvm.org/D66738#1652285>, @hokein wrote:
> I don't have a strong preference on how to highlight `BindingDecl`, but I think highlighting them as `Variable` is better than no highlighting them at all, so LGTM from myside. @ilya-biryukov thoughts?
Also think highlighting them as variables is the right thing.
e.g. if I do something like:
void foo(std::pair<int, int> p) {
auto [f,s] = p;
return f + s;
}
this is roughly equivalent to:
void foo(std::pair<int, int> p) {
auto f = p.first;
auto s = p.second;
return f + s;
}
Therefore, it should also be highlighted in the same way.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66738/new/
https://reviews.llvm.org/D66738
More information about the cfe-commits
mailing list