@@ -1003,6 +1003,7 @@ class ForEachStmt : public LabeledStmt {
1003
1003
SourceLoc ForLoc;
1004
1004
SourceLoc TryLoc;
1005
1005
SourceLoc AwaitLoc;
1006
+ SourceLoc UnsafeLoc;
1006
1007
Pattern *Pat;
1007
1008
SourceLoc InLoc;
1008
1009
Expr *Sequence;
@@ -1020,13 +1021,14 @@ class ForEachStmt : public LabeledStmt {
1020
1021
1021
1022
public:
1022
1023
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,
1024
1026
SourceLoc WhereLoc, Expr *WhereExpr, BraceStmt *Body,
1025
1027
std::optional<bool > implicit = std::nullopt )
1026
1028
: LabeledStmt(StmtKind::ForEach, getDefaultImplicitFlag(implicit, ForLoc),
1027
1029
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),
1030
1032
WhereExpr(WhereExpr), Body(Body) {
1031
1033
setPattern (Pat);
1032
1034
}
@@ -1064,6 +1066,7 @@ class ForEachStmt : public LabeledStmt {
1064
1066
1065
1067
SourceLoc getAwaitLoc () const { return AwaitLoc; }
1066
1068
SourceLoc getTryLoc () const { return TryLoc; }
1069
+ SourceLoc getUnsafeLoc () const { return UnsafeLoc; }
1067
1070
1068
1071
// / getPattern - Retrieve the pattern describing the iteration variables.
1069
1072
// / These variables will only be visible within the body of the loop.
0 commit comments