================ @@ -1432,12 +1459,20 @@ namespace { ArrayRef<UnexpandedParameterPack> Unexpanded, bool &ShouldExpand, bool &RetainExpansion, UnsignedOrNone &NumExpansions) { - return getSema().CheckParameterPacksForExpansion(EllipsisLoc, - PatternRange, Unexpanded, - TemplateArgs, - ShouldExpand, - RetainExpansion, - NumExpansions); + if (SemaRef.CurrentInstantiationScope && + SemaRef.inConstraintSubstitution()) { + for (UnexpandedParameterPack ParmPack : Unexpanded) { + NamedDecl *VD = ParmPack.first.dyn_cast<NamedDecl *>(); + if (!isa_and_present<ParmVarDecl>(VD)) + continue; + if (maybeInstantiateFunctionParameterToScope(cast<ParmVarDecl>(VD))) + return true; ---------------- cor3ntin wrote:
You can use dyn_cast https://github.com/llvm/llvm-project/pull/122423 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits