[PATCH] D116352: [CodeCompletion] Signature help for template argument lists
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 3 02:12:41 PST 2022
kadircet added a comment.
thanks this looks great! just a question around rendering of the result type chunk. feel free to leave a fixme if there's no easy way of doing that.
================
Comment at: clang/lib/Parse/ParseTemplate.cpp:1237
+///
+/// \param NameHint is not required, and merely affects code completion.
+bool Parser::ParseTemplateIdAfterTemplateName(bool ConsumeLastToken,
----------------
`s/NameHint/Template` ?
================
Comment at: clang/lib/Sema/SemaCodeComplete.cpp:3785
+ if (const auto *FTD = dyn_cast<FunctionTemplateDecl>(TD))
+ return FTD->getTemplatedDecl()->getType().getAsString(Policy);
+ if (isa<TypeAliasTemplateDecl>(TD))
----------------
the rendering looks a little bit surprising to me `foo<arg1,arg2> -> bool (float)` we might consider printing parameters first, e.g. `foo<arg1,arg2>(float) -> bool`. i think this also looks more natural for the following signature help on function parameters.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116352/new/
https://reviews.llvm.org/D116352
More information about the cfe-commits
mailing list