@@ -2172,7 +2172,7 @@ class CompletionLookup final : public swift::VisibleDeclConsumer {
2172
2172
2173
2173
Builder.addCallParameter (param->getArgumentName (), type,
2174
2174
param->isVariadic (), /* Outermost*/ true ,
2175
- param->isInOut (), isIUO);
2175
+ param->isInOut (), isIUO, param-> isAutoClosure () );
2176
2176
}
2177
2177
}
2178
2178
@@ -2270,12 +2270,12 @@ class CompletionLookup final : public swift::VisibleDeclConsumer {
2270
2270
auto isIUO =
2271
2271
PD->getAttrs ().hasAttribute <ImplicitlyUnwrappedOptionalAttr>();
2272
2272
Builder.addCallParameter (argName, bodyName, ParamType,
2273
- Param.isVariadic (), /* TopLevel*/ true ,
2274
- Param.isInOut (), isIUO);
2275
- } else {
2276
- Builder.addCallParameter (Param.getLabel (), ParamType,
2277
2273
Param.isVariadic (), /* TopLevel*/ true ,
2278
- Param.isInOut (), /* isIUO*/ false );
2274
+ Param.isInOut (), isIUO, Param.isAutoClosure ());
2275
+ } else {
2276
+ Builder.addCallParameter (
2277
+ Param.getLabel (), ParamType, Param.isVariadic (), /* TopLevel*/ true ,
2278
+ Param.isInOut (), /* isIUO*/ false , Param.isAutoClosure ());
2279
2279
}
2280
2280
modifiedBuilder = true ;
2281
2281
NeedComma = true ;
@@ -2490,7 +2490,7 @@ class CompletionLookup final : public swift::VisibleDeclConsumer {
2490
2490
Builder.addCallParameter (Ctx.Id_self , SelfParam.getPlainType (),
2491
2491
/* IsVarArg*/ false , /* TopLevel*/ true ,
2492
2492
SelfParam.isInOut (),
2493
- /* isIUO*/ false );
2493
+ /* isIUO*/ false , /* isAutoClosure */ false );
2494
2494
Builder.addRightParen ();
2495
2495
} else if (trivialTrailingClosure) {
2496
2496
Builder.addBraceStmtWithCursor (" { code }" );
@@ -3336,7 +3336,8 @@ class CompletionLookup final : public swift::VisibleDeclConsumer {
3336
3336
assert (RHSType && resultType);
3337
3337
builder.addCallParameter (Identifier (), Identifier (), RHSType,
3338
3338
/* IsVarArg*/ false , /* TopLevel*/ true ,
3339
- /* IsInOut*/ false , /* isIUO*/ false );
3339
+ /* IsInOut*/ false , /* isIUO*/ false ,
3340
+ /* isAutoClosure*/ false );
3340
3341
addTypeAnnotation (builder, resultType);
3341
3342
}
3342
3343
@@ -3359,7 +3360,8 @@ class CompletionLookup final : public swift::VisibleDeclConsumer {
3359
3360
builder.addWhitespace (" " );
3360
3361
if (RHSType)
3361
3362
builder.addCallParameter (Identifier (), Identifier (), RHSType, false , true ,
3362
- /* IsInOut*/ false , /* isIUO*/ false );
3363
+ /* IsInOut*/ false , /* isIUO*/ false ,
3364
+ /* isAutoClosure*/ false );
3363
3365
if (resultType)
3364
3366
addTypeAnnotation (builder, resultType);
3365
3367
}
@@ -3648,19 +3650,19 @@ class CompletionLookup final : public swift::VisibleDeclConsumer {
3648
3650
builder.addLeftParen ();
3649
3651
builder.addCallParameter (context.getIdentifier (" red" ), floatType, false ,
3650
3652
true , /* IsInOut*/ false ,
3651
- /* isIUO*/ false );
3653
+ /* isIUO*/ false , /* isAutoClosure */ false );
3652
3654
builder.addComma ();
3653
3655
builder.addCallParameter (context.getIdentifier (" green" ), floatType, false ,
3654
- true , /* IsInOut*/ false ,
3655
- /* isIUO */ false );
3656
+ true , /* IsInOut*/ false , /* isIUO */ false ,
3657
+ /* isAutoClosure */ false );
3656
3658
builder.addComma ();
3657
3659
builder.addCallParameter (context.getIdentifier (" blue" ), floatType, false ,
3658
- true , /* IsInOut*/ false ,
3659
- /* isIUO */ false );
3660
+ true , /* IsInOut*/ false , /* isIUO */ false ,
3661
+ /* isAutoClosure */ false );
3660
3662
builder.addComma ();
3661
3663
builder.addCallParameter (context.getIdentifier (" alpha" ), floatType, false ,
3662
- true , /* IsInOut*/ false ,
3663
- /* isIUO */ false );
3664
+ true , /* IsInOut*/ false , /* isIUO */ false ,
3665
+ /* isAutoClosure */ false );
3664
3666
builder.addRightParen ();
3665
3667
});
3666
3668
@@ -3670,7 +3672,7 @@ class CompletionLookup final : public swift::VisibleDeclConsumer {
3670
3672
builder.addLeftParen ();
3671
3673
builder.addCallParameter (context.getIdentifier (" resourceName" ),
3672
3674
stringType, false , true , /* IsInOut*/ false ,
3673
- /* isIUO*/ false );
3675
+ /* isIUO*/ false , /* isAutoClosure */ false );
3674
3676
builder.addRightParen ();
3675
3677
});
3676
3678
0 commit comments