@@ -1003,6 +1003,7 @@ class ForEachStmt : public LabeledStmt {
10031003 SourceLoc ForLoc;
10041004 SourceLoc TryLoc;
10051005 SourceLoc AwaitLoc;
1006+ SourceLoc UnsafeLoc;
10061007 Pattern *Pat;
10071008 SourceLoc InLoc;
10081009 Expr *Sequence;
@@ -1020,13 +1021,14 @@ class ForEachStmt : public LabeledStmt {
10201021
10211022public:
10221023 ForEachStmt (LabeledStmtInfo LabelInfo, SourceLoc ForLoc, SourceLoc TryLoc,
1023- SourceLoc AwaitLoc, Pattern *Pat, SourceLoc InLoc, Expr *Sequence,
1024+ SourceLoc AwaitLoc, SourceLoc UnsafeLoc, Pattern *Pat,
1025+ SourceLoc InLoc, Expr *Sequence,
10241026 SourceLoc WhereLoc, Expr *WhereExpr, BraceStmt *Body,
10251027 std::optional<bool > implicit = std::nullopt )
10261028 : LabeledStmt(StmtKind::ForEach, getDefaultImplicitFlag(implicit, ForLoc),
10271029 LabelInfo),
1028- ForLoc (ForLoc), TryLoc(TryLoc), AwaitLoc(AwaitLoc), Pat( nullptr ),
1029- InLoc(InLoc), Sequence(Sequence), WhereLoc(WhereLoc),
1030+ ForLoc (ForLoc), TryLoc(TryLoc), AwaitLoc(AwaitLoc), UnsafeLoc(UnsafeLoc ),
1031+ Pat( nullptr ), InLoc(InLoc), Sequence(Sequence), WhereLoc(WhereLoc),
10301032 WhereExpr(WhereExpr), Body(Body) {
10311033 setPattern (Pat);
10321034 }
@@ -1064,6 +1066,7 @@ class ForEachStmt : public LabeledStmt {
10641066
10651067 SourceLoc getAwaitLoc () const { return AwaitLoc; }
10661068 SourceLoc getTryLoc () const { return TryLoc; }
1069+ SourceLoc getUnsafeLoc () const { return UnsafeLoc; }
10671070
10681071 // / getPattern - Retrieve the pattern describing the iteration variables.
10691072 // / These variables will only be visible within the body of the loop.
0 commit comments