Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clangd] add inlay hints for std::forward-ed parameter packs
This adds special-case treatment for parameter packs in make_unique-like functions to forward parameter names to inlay hints. The parameter packs are being resolved recursively by traversing the function body of forwarding functions looking for expressions matching the (std::forwarded) parameters expanded from a pack. The implementation checks whether parameters are being passed by (rvalue) reference or value and adds reference inlay hints accordingly. The traversal has a limited recursion stack depth, and recursive calls like std::make_tuple are cut off to avoid hinting duplicate parameter names. Reviewed By: sammccall Differential Revision: https://reviews.llvm.org/D124690
- Loading branch information
Showing
4 changed files
with
903 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.