[PATCH] D72498: [clangd] Print underlying type for decltypes in hover

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 13 06:16:32 PST 2020


kadircet added a comment.

In D72498#1816785 <https://reviews.llvm.org/D72498#1816785>, @ilya-biryukov wrote:

> In D72498#1816424 <https://reviews.llvm.org/D72498#1816424>, @lh123 wrote:
>
> > Currently, I think that in most cases, showing both expanded (canonical) and spelled types is sufficient.
> >
> > > This has been used in ycmd for ~4 years without complaint. https://github.com/clangd/clangd/issues/58#issuecomment-507800970
>
>
> That actually doesn't look bad. Maybe let's try doing that and see whether we'll get negative feedback?
>  That seems to give useful information in **all** cases, so at least it'll cover all use-cases even it's more verbose.
>
> What do others think?


SGTM, happy to update all types in `HoverInfo` to contain both a `pretty-printed` and `canonical` version. Where pretty-printed would just means desugared, so keywords like auto/decltype would've
been stripped away and it would be the type as written in all other cases, while canonical would refer to `clang canonical` with all of the type aliases etc. resolved. Ofc.
Does that SG to you as well @sammccall ?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72498/new/

https://reviews.llvm.org/D72498





More information about the cfe-commits mailing list