[PATCH] D36527: Implemented P0428R2 - Familiar template syntax for generic lambdas
Faisal Vali via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 28 17:57:33 PDT 2017
faisalv added a comment.
In https://reviews.llvm.org/D36527#854600, @rsmith wrote:
> This patch appears to be missing some necessary changes in the following places:
>
> - lib/Serialization -- round-trip the new information through PCH / modules
Shouldn't the explicit template parameter information be automatically serialized within the non-implicitness of the corresponding template parameter decls within our TemplateParameterList?
> - lib/AST/StmtPrinter.cpp -- pretty-printing lambdas with explicit template parameters
yes - this would be nice.
> - lib/Sema/TreeTransform.h -- template instantiation of lambdas with explicit template arguments
yes - i had wondered about TreeTransform - I had hoped that the transformation of the template parameter list (for all generic lambdas) would be sufficient (perhaps only need to be tweaked to maintain the implicit flag on template parameters, if that's not transferred through?) - but I agree this does need to be tested well (substitution into default template arguments, non-type-template parameters for e.g.).
> - lib/AST/RecursiveASTVisitor.h -- recursive AST visitation should visit explicit template parameters
Would we also want to (explicitly) visit the implicit template parameters?
Interestingly we don't (explicitly) visit the lambda's function parameters?
> We'll also need to agree within the cxx-abi-dev list how to mangle lambda closure types for this form and lib/AST/ItaniumMangle.cpp's `mangleLambda` will need to be updated to match. (The MS mangling is not based on the type of the lambda call operator, so we probably don't need changes there.)
https://reviews.llvm.org/D36527
More information about the cfe-commits
mailing list