This enables support of hover on concepts with auto types.
I'm not 100% sure if this is the correct fix, but it works for
the exmaples and in vscode.
Differential D154853
[clangd][c++20]Consider the constraint of a constrained auto in FindTarget. massberg on Jul 10 2023, 8:29 AM. Authored by
Details
Diff Detail
Event TimelineComment Actions Sorry about the delay here. Making the whole AutoTypeLoc resolve to the concept doesn't seem right - the auto part does not refer to the concept, and in principle refers to another type entirely. Really I think there should be a child node representing just the concept part, probably a ConceptReference. Compared to the case we discussed where constrained auto is a template type param, this looks easier: all the information is there in AutoTypeLoc.
|
this is going to have the same behavior on the auto token, right?
This is my main practical concern, that go-to-definition, hover, find-refs, go-to-type etc on auto will now treat Fooable as their target.
(That said, I'm not sure exactly how common it is for auto to be constrained in a non-dependent context...)