[clangd] Include the operator name in documentHighlight (#220518)
## Summary
- Placing the cursor on an overloaded operator's declaration (e.g.
`operator new`, `operator[]`) and requesting
`textDocument/documentHighlight` only highlighted the `operator` keyword
itself, not the name or symbol that follows it (`new`, `[]`, etc.), even
though that name is what's actually significant to the user.
- `ReferenceFinder` already splits some references into several spelled
tokens (used for Objective-C's split selector syntax); this reuses that
mechanism for the operator name too, extracting the tokens spelled in
the operator name's source range. This only applies to the declaration's
own occurrence.
## Test plan
- [x] `ninja check-clangd` passes
- [x] New cases added to `HighlightsTest.All` in
`clang-tools-extra/clangd/unittests/XRefsTests.cpp` covering `operator
new`, `operator delete` (clicking on either the keyword or the name),
and a multi-token operator (`operator()`)
GitOrigin-RevId: fd63167bbd7f0193f21129abe49604b98f777cdc
2 files changed