[clangd] Ensure lambda init-capture gets semantic token
authorNathan Ridge <zeratul976@hotmail.com>
Tue, 21 Sep 2021 07:44:31 +0000 (03:44 -0400)
committerNathan Ridge <zeratul976@hotmail.com>
Thu, 23 Sep 2021 07:52:57 +0000 (03:52 -0400)
commit4223195de3eaaa9c221d1f178899f221be6264c5
treece9eba866d52115d1f9bddd96cde321ef133104d
parent1f3f144446d1766b6bd63ac02a064450c4fa5e55
[clangd] Ensure lambda init-capture gets semantic token

Prior to this patch, CollectExtraHighlightings would incorrectly produce
a token for the init-capture's type which overlapped the name and
resulted in both being dropped.

Fixes https://github.com/clangd/clangd/issues/868

Differential Revision: https://reviews.llvm.org/D110130
clang-tools-extra/clangd/SemanticHighlighting.cpp
clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp