[PATCH] D120258: [clangd] Add inlay hints for auto-typed parameters with one instantiation.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 23 06:50:32 PST 2022
sammccall added a comment.
In D120258#3338555 <https://reviews.llvm.org/D120258#3338555>, @Trass3r wrote:
> For a callback like
>
> [](auto) {...}
>
> the inlay hint is displayed after the `)`.
Good catch, thanks!
I'll just suppress the hint here, ParamVarDecl::getLocation() appears to incorrectly point at the rparen and it's not obvious what we're hinting without a name in any case.
> Which also looks confusingly like a hint for the lambda return type (which isn't implemented yet afaik).
It's not, but great idea, and I think easy to implement (`-> foo` is already shown for `auto`-typed functions).
> And I've even seen this:
> F22205415: grafik.png <https://reviews.llvm.org/F22205415>
> With a lambda in a versioned method like
>
> template <Version V> void Foo<V>::foo()
OK, this is scary... this is multiple hints at the same point right?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120258/new/
https://reviews.llvm.org/D120258
More information about the cfe-commits
mailing list