[PATCH] D92041: [clangd] Add hover info for `this` expr
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 1 09:18:10 PST 2020
kadircet requested changes to this revision.
kadircet added a comment.
This revision now requires changes to proceed.
In D92041#2424928 <https://reviews.llvm.org/D92041#2424928>, @njames93 wrote:
> One last point, is it worth including cv qualifications in the hover info?
Yes, I think we should (and I thought we already did!). Sorry for messing this up, I am not sure what made me change my mind in the middle but we should definitely be using `QualType` printing rather than `NamedDecl` printing, similar to how we generate hover for `auto`s.
It produces an output like:
namespace ns {
template <typename T> struct Foo {};
tempate <> struct Foo<int> { void bar() { thi^s; } };
}
-> `const ns::Foo<int>*`
which contains both the namespaces and template parameters, including cv-qualifier and is pretty concise. The only downside to Decl printing is we will lose `Documentation` support, I am not sure how important it is but we can easily augment the output to contain that if it turns out to be important.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92041/new/
https://reviews.llvm.org/D92041
More information about the cfe-commits
mailing list