================ @@ -2587,15 +2587,17 @@ struct ConvertConstructorToDeductionGuideTransform { : ParamTy->isRValueReferenceType() ? VK_XValue : VK_PRValue); } - - ParmVarDecl *NewParam = ParmVarDecl::Create(SemaRef.Context, DC, - OldParam->getInnerLocStart(), - OldParam->getLocation(), - OldParam->getIdentifier(), - NewDI->getType(), - NewDI, - OldParam->getStorageClass(), - NewDefArg.get()); + // Handle arrays and functions decay. + auto NewType = NewDI->getType(); + if (NewType->isArrayType()) + NewType = SemaRef.Context.getArrayDecayedType(NewType); + else if (NewType->isFunctionType()) + NewType = SemaRef.Context.getPointerType(NewType); ---------------- hokein wrote:
Good point, thanks. I was not aware of this API. https://github.com/llvm/llvm-project/pull/78159 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits