[PATCH] Support explicit template arguments with variadic generic lambdas
Richard Smith
richard at metafoo.co.uk
Thu Jan 16 12:53:23 PST 2014
LGTM with a simplification.
================
Comment at: lib/Sema/SemaTemplateDeduction.cpp:2807-2810
@@ +2806,6 @@
+ if (Param->isParameterPack() && CurrentInstantiationScope) {
+ const TemplateArgument *ExplicitArgs;
+ unsigned NumExplicitArgs;
+ if (CurrentInstantiationScope->getPartiallySubstitutedPack(&ExplicitArgs,
+ &NumExplicitArgs) == Param) {
+ // Forget the partially-substituted pack; it's substitution is now
----------------
You don't need to pass these unused pointer args. Just:
if (Param->isParameterPack() && CurrentInstantiationScope &&
CurrentInstantiationScope->getPartiallySubstitutedPack() == Param)
CurrentInstantiationScope->ResetPartiallySubstitutedPack();
... should do the trick.
http://llvm-reviews.chandlerc.com/D2135
More information about the cfe-commits
mailing list