[PATCH] D76896: [clangd] Color dependent names based on their heuristic target if they have one
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 16 08:10:33 PDT 2022
sammccall added inline comments.
================
Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:157
+resolveConflict(ArrayRef<HighlightingToken> Tokens) {
+ if (Tokens.size() != 2)
+ return llvm::None;
----------------
nridge wrote:
> nridge wrote:
> > sammccall wrote:
> > > why a limit of 2, vs a loop?
> > I'm not aware of a scenario where we'd get more than two conflicting highlightings, except when macros are involved in which case we don't have a good way to disambiguate anyways.
> I should've listened to you when you suggested a loop :)
>
> I overlooked the case where `findExplicitReferences()` contributes more than one candidate token because a dependent name is heuristically resolved to an overload set, in which case we get one target for each overload.
>
> Fixed in D121775.
I think this is a good sign, my tendency is to borrow too many problems from the future anyway :-)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76896/new/
https://reviews.llvm.org/D76896
More information about the cfe-commits
mailing list