@@ -492,8 +492,9 @@ synthesizeEnumRawValueConstructorBody(AbstractFunctionDecl *afd,
492492 reinterpretCastRef->setType (
493493 FunctionType::get ({FunctionType::Param (rawTy)}, enumTy, info));
494494
495+ auto *argList = ArgumentList::forImplicitUnlabeled (ctx, {paramRef});
495496 auto reinterpreted = CallExpr::createImplicit (ctx, reinterpretCastRef,
496- { paramRef }, { Identifier () } );
497+ argList );
497498 reinterpreted->setType (enumTy);
498499 reinterpreted->setThrows (false );
499500
@@ -574,8 +575,9 @@ synthesizeEnumRawValueGetterBody(AbstractFunctionDecl *afd, void *context) {
574575 reinterpretCastRef->setType (
575576 FunctionType::get ({FunctionType::Param (enumTy)}, rawTy, info));
576577
578+ auto *argList = ArgumentList::forImplicitUnlabeled (ctx, {selfRef});
577579 auto reinterpreted = CallExpr::createImplicit (ctx, reinterpretCastRef,
578- { selfRef }, { Identifier () } );
580+ argList );
579581 reinterpreted->setType (rawTy);
580582 reinterpreted->setThrows (false );
581583
@@ -940,9 +942,9 @@ synthesizeUnionFieldGetterBody(AbstractFunctionDecl *afd, void *context) {
940942 FunctionType::get (AnyFunctionType::Param (selfDecl->getInterfaceType ()),
941943 importedFieldDecl->getInterfaceType (), info));
942944
945+ auto *argList = ArgumentList::forImplicitUnlabeled (ctx, {selfRef});
943946 auto reinterpreted = CallExpr::createImplicit (ctx, reinterpretCastRefExpr,
944- { selfRef },
945- { Identifier () });
947+ argList);
946948 reinterpreted->setType (importedFieldDecl->getInterfaceType ());
947949 reinterpreted->setThrows (false );
948950 auto ret = new (ctx) ReturnStmt (SourceLoc (), reinterpreted);
@@ -987,9 +989,10 @@ synthesizeUnionFieldSetterBody(AbstractFunctionDecl *afd, void *context) {
987989 AnyFunctionType::Param (inoutSelfDecl->getInterfaceType (), Identifier (),
988990 ParameterTypeFlags ().withInOut (true )),
989991 ctx.TheRawPointerType , addressOfInfo));
992+
993+ auto *selfPtrArgs = ArgumentList::forImplicitUnlabeled (ctx, {inoutSelf});
990994 auto selfPointer = CallExpr::createImplicit (ctx, addressofFnRefExpr,
991- { inoutSelf },
992- { Identifier () });
995+ selfPtrArgs);
993996 selfPointer->setType (ctx.TheRawPointerType );
994997 selfPointer->setThrows (false );
995998
@@ -1007,9 +1010,11 @@ synthesizeUnionFieldSetterBody(AbstractFunctionDecl *afd, void *context) {
10071010 {AnyFunctionType::Param (newValueDecl->getInterfaceType ()),
10081011 AnyFunctionType::Param (ctx.TheRawPointerType )},
10091012 TupleType::getEmpty (ctx), initializeInfo));
1013+
1014+ auto *initArgs =
1015+ ArgumentList::forImplicitUnlabeled (ctx, {newValueRef, selfPointer});
10101016 auto initialize = CallExpr::createImplicit (ctx, initializeFnRefExpr,
1011- { newValueRef, selfPointer },
1012- { Identifier (), Identifier () });
1017+ initArgs);
10131018 initialize->setType (TupleType::getEmpty (ctx));
10141019 initialize->setThrows (false );
10151020
@@ -7653,9 +7658,9 @@ createAccessorImplCallExpr(FuncDecl *accessorImpl,
76537658 accessorImplDotCallExpr->setType (accessorImpl->getMethodInterfaceType ());
76547659 accessorImplDotCallExpr->setThrows (false );
76557660
7661+ auto *argList = ArgumentList::forImplicitUnlabeled (ctx, {keyRefExpr});
76567662 auto *accessorImplCallExpr =
7657- CallExpr::createImplicit (ctx, accessorImplDotCallExpr,
7658- { keyRefExpr }, { Identifier () });
7663+ CallExpr::createImplicit (ctx, accessorImplDotCallExpr, argList);
76597664 accessorImplCallExpr->setType (accessorImpl->getResultInterfaceType ());
76607665 accessorImplCallExpr->setThrows (false );
76617666 return accessorImplCallExpr;
@@ -9705,8 +9710,8 @@ synthesizeConstantGetterBody(AbstractFunctionDecl *afd, void *voidContext) {
97059710 // (rawValue: T) -> ...
97069711 initTy = initTy->castTo <FunctionType>()->getResult ();
97079712
9708- auto initCall = CallExpr::createImplicit (ctx, initRef, { expr },
9709- { ctx. Id_rawValue } );
9713+ auto *argList = ArgumentList::forImplicitSingle (ctx, ctx. Id_rawValue , expr);
9714+ auto initCall = CallExpr::createImplicit ( ctx, initRef, argList );
97109715 initCall->setType (initTy);
97119716 initCall->setThrows (false );
97129717
0 commit comments