[PATCH] D64634: [clangd] Fix duplicate highlighting tokens appearing in initializer lists
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 15 06:49:58 PDT 2019
ilya-biryukov added a comment.
Have we tried figuring out why `RecursiveASTVisitor` visits the argument lists twice? Is that an expected behavior?
================
Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:37
+ llvm::sort(Tokens,
+ [](const HighlightingToken &Lhs, const HighlightingToken &Rhs) {
+ return std::tie(Lhs.R, Lhs.Kind) < std::tie(Rhs.R, Rhs.Kind);
----------------
NIT: in LLVM style, these should be called `LHS` and `RHS` as they are abbreviations.
However, in clangd we typically use `L` and `R` for that in those cases, I would suggest sticking to that.
(One-letter names are harder to confuse with each other)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64634/new/
https://reviews.llvm.org/D64634
More information about the cfe-commits
mailing list