@@ -502,9 +502,7 @@ synthesizeEnumRawValueConstructorBody(AbstractFunctionDecl *afd,
502
502
/* implicit*/ true );
503
503
assign->setType (TupleType::getEmpty (ctx));
504
504
505
- auto result = TupleExpr::createEmpty (ctx, SourceLoc (), SourceLoc (),
506
- /* Implicit=*/ true );
507
- auto ret = new (ctx) ReturnStmt (SourceLoc (), result, /* Implicit=*/ true );
505
+ auto ret = new (ctx) ReturnStmt (SourceLoc (), nullptr , /* Implicit=*/ true );
508
506
509
507
auto body = BraceStmt::create (ctx, SourceLoc (), {assign, ret}, SourceLoc (),
510
508
/* implicit*/ true );
@@ -1366,11 +1364,7 @@ synthesizeValueConstructorBody(AbstractFunctionDecl *afd, void *context) {
1366
1364
}
1367
1365
}
1368
1366
1369
- auto result = TupleExpr::createEmpty (ctx, SourceLoc (), SourceLoc (),
1370
- /* Implicit=*/ true );
1371
- result->setType (TupleType::getEmpty (ctx));
1372
-
1373
- auto ret = new (ctx) ReturnStmt (SourceLoc (), result, /* Implicit=*/ true );
1367
+ auto ret = new (ctx) ReturnStmt (SourceLoc (), nullptr , /* Implicit=*/ true );
1374
1368
stmts.push_back (ret);
1375
1369
1376
1370
// Create the function body.
@@ -1567,9 +1561,7 @@ synthesizeRawValueBridgingConstructorBody(AbstractFunctionDecl *afd,
1567
1561
/* Implicit=*/ true );
1568
1562
assign->setType (TupleType::getEmpty (ctx));
1569
1563
1570
- auto result = TupleExpr::createEmpty (ctx, SourceLoc (), SourceLoc (),
1571
- /* Implicit=*/ true );
1572
- auto ret = new (ctx) ReturnStmt (SourceLoc (), result, /* Implicit=*/ true );
1564
+ auto ret = new (ctx) ReturnStmt (SourceLoc (), nullptr , /* Implicit=*/ true );
1573
1565
1574
1566
auto body = BraceStmt::create (ctx, SourceLoc (), {assign, ret}, SourceLoc ());
1575
1567
return { body, /* isTypeChecked=*/ true };
0 commit comments