[PATCH] D70325: [clangd] Fix hover 'local scope' to include class template params
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 19 01:57:04 PST 2019
sammccall added a comment.
Sorry about the bad rebase, I landed the right version i think :-)
In D70325#1750496 <https://reviews.llvm.org/D70325#1750496>, @sammccall wrote:
> In D70325#1749432 <https://reviews.llvm.org/D70325#1749432>, @kadircet wrote:
>
> > LGTM, with a question. What about default template params? I believe we would also like to print them, could you add a test case for that?
>
>
> They're not printed, as the type is "as written". Added a testcase and a FIXME.
> (I don't think this case is terribly important - either behavior seems to have its advantages, the combination of default parameters and partial specialization is fairly rare, and not much confusion seems likely in practice)
Forgot to mention, I didn't fix this because it's significantly more work: for Type you have access to the canonical args (with defaults, but with type-parameter-0-0 instead of T), and the as-written args (where defaults are omitted).
I think you have to trawl around special casing various Decls if you want this to work. I wanted to get the cheap improvement in because realistically I won't get to that refinement soon.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70325/new/
https://reviews.llvm.org/D70325
More information about the cfe-commits
mailing list