Skip to content

Commit 0be713b

Browse files
committed
[Sema] Add arg parens to two generated calls
1 parent d91ba3c commit 0be713b

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

lib/Sema/CSApply.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7360,9 +7360,8 @@ Expr *ExprRewriter::finishApply(ApplyExpr *apply, Type openedType,
73607360
return cs.getType(E);
73617361
};
73627362

7363-
auto callSubExpr = CallExpr::create(tc.Context, body, escapable, {}, {},
7364-
/*trailing closure*/ false,
7365-
/*implicit*/ true, Type(), getType);
7363+
auto callSubExpr = CallExpr::createImplicit(tc.Context, body, {escapable}, {}, getType);
7364+
cs.cacheSubExprTypes(callSubExpr);
73667365
cs.setType(callSubExpr, resultType);
73677366

73687367
auto replacement = new (tc.Context)
@@ -7414,10 +7413,8 @@ Expr *ExprRewriter::finishApply(ApplyExpr *apply, Type openedType,
74147413
return cs.getType(E);
74157414
};
74167415

7417-
auto callSubExpr = CallExpr::create(tc.Context, body, opaqueValue, {},
7418-
{}, /*trailing closure*/ false,
7419-
/*implicit*/ true,
7420-
Type(), getType);
7416+
auto callSubExpr = CallExpr::createImplicit(tc.Context, body, {opaqueValue}, {}, getType);
7417+
cs.cacheSubExprTypes(callSubExpr);
74217418
cs.setType(callSubExpr, resultTy);
74227419

74237420
auto replacement = new (tc.Context)

0 commit comments

Comments
 (0)