[PATCH] D124690: [clangd] add inlay hints for std::forward-ed parameter packs
Tobias Ribizel via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 30 06:00:38 PDT 2022
upsj updated this revision to Diff 432900.
upsj marked an inline comment as done.
upsj added a comment.
Thanks Nathan, that was exactly it. I thought I looked at getTypePtr() directly, but I must have been mistaken.
After a small fix (only adding inlay hints until the first unexpanded pack expression, it seems to work now).
Short explanation of what is going on: I split the parameters into head, pack and tail where pack are all parameters matching the variadic template type parameter we are expanding.
This way, I need to make no allocations inside the visitor.
The only thing to be fixed is a `make_tuple`-like call, where each parameter is called `head`, probably simple deduplication makes most sense.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124690/new/
https://reviews.llvm.org/D124690
Files:
clang-tools-extra/clangd/AST.cpp
clang-tools-extra/clangd/AST.h
clang-tools-extra/clangd/InlayHints.cpp
clang-tools-extra/clangd/unittests/InlayHintTests.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124690.432900.patch
Type: text/x-patch
Size: 27153 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220530/b481424d/attachment-0001.bin>
More information about the cfe-commits
mailing list