@@ -79,9 +79,8 @@ deriveBodyEquatable_enum_uninhabited_eq(AbstractFunctionDecl *eqDecl, void *) {
79
79
SourceLoc (), /* HasTrailingClosure*/ false ,
80
80
/* implicit*/ true ,
81
81
TupleType::get (abTupleElts, C));
82
- auto switchStmt = SwitchStmt::create (LabeledStmtInfo (), SourceLoc (), abExpr,
83
- SourceLoc (), cases, SourceLoc (),
84
- SourceLoc (), C);
82
+ auto switchStmt =
83
+ SwitchStmt::createImplicit (LabeledStmtInfo (), abExpr, cases, C);
85
84
statements.push_back (switchStmt);
86
85
87
86
auto body = BraceStmt::create (C, SourceLoc (), statements, SourceLoc ());
@@ -277,9 +276,8 @@ deriveBodyEquatable_enum_hasAssociatedValues_eq(AbstractFunctionDecl *eqDecl,
277
276
auto abExpr = TupleExpr::create (C, SourceLoc (), { aRef, bRef }, {}, {},
278
277
SourceLoc (), /* HasTrailingClosure*/ false ,
279
278
/* implicit*/ true );
280
- auto switchStmt = SwitchStmt::create (LabeledStmtInfo (), SourceLoc (), abExpr,
281
- SourceLoc (), cases, SourceLoc (),
282
- SourceLoc (), C);
279
+ auto switchStmt =
280
+ SwitchStmt::createImplicit (LabeledStmtInfo (), abExpr, cases, C);
283
281
statements.push_back (switchStmt);
284
282
285
283
auto body = BraceStmt::create (C, SourceLoc (), statements, SourceLoc ());
@@ -752,9 +750,8 @@ deriveBodyHashable_enum_hasAssociatedValues_hashInto(
752
750
// generate: switch enumVar { }
753
751
auto enumRef = new (C) DeclRefExpr (selfDecl, DeclNameLoc (),
754
752
/* implicit*/ true );
755
- auto switchStmt = SwitchStmt::create (LabeledStmtInfo (), SourceLoc (), enumRef,
756
- SourceLoc (), cases, SourceLoc (),
757
- SourceLoc (), C);
753
+ auto switchStmt =
754
+ SwitchStmt::createImplicit (LabeledStmtInfo (), enumRef, cases, C);
758
755
759
756
auto body = BraceStmt::create (C, SourceLoc (), {ASTNode (switchStmt)},
760
757
SourceLoc ());
0 commit comments