[PATCH] D71545: [clangd] Improve hover for auto on template instantiations

Sam McCall via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 18 03:03:57 PST 2019


Ok, sorry for getting the wrong end of the stick re the history.

Arguments vs parameters - are we sure this is a distinction worth surfacing
to users/uis? I guess modeling both using the same struct is awkward.

On Wed, Dec 18, 2019, 10:57 AM Kadir Cetinkaya via Phabricator <
reviews at reviews.llvm.org> wrote:

> kadircet marked an inline comment as done.
> kadircet added inline comments.
>
>
> ================
> Comment at: clang-tools-extra/clangd/unittests/HoverTests.cpp:1209
>              // FIXME: Print template instantiation parameters.
> -            HI.Name = "initializer_list";
> +            HI.Name = "initializer_list<int>";
>              HI.Kind = index::SymbolKind::Class;
> ----------------
> sammccall wrote:
> > Hang on, I think we're going round in circles with this design.
> >
> > IIRC the idea was that `Name` doesn't include template parameters,
> signature, etc, so clients control rendering.
> >
> > Isn't it easy to reconstitute this from the template argument list in
> the hover info?
> we were only storing template parameters, not arguments. they've always
> been the part of the name, they had disappeared after a previous patch, as
> an intermediate state and this was introducing them back.
>
> i am planning to move template arguments into a different field though, as
> template parameters, which should also help with dropping default arguments.
>
>
> Repository:
>   rG LLVM Github Monorepo
>
> CHANGES SINCE LAST ACTION
>   https://reviews.llvm.org/D71545/new/
>
> https://reviews.llvm.org/D71545
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191218/5278a5a8/attachment-0001.html>


More information about the cfe-commits mailing list