@@ -632,17 +632,17 @@ class IfStmt : public LabeledConditionalStmt {
632632// /
633633class GuardStmt : public LabeledConditionalStmt {
634634 SourceLoc GuardLoc;
635- Stmt *Body;
635+ BraceStmt *Body;
636636
637637public:
638638 GuardStmt (SourceLoc GuardLoc, StmtCondition Cond,
639- Stmt *Body, Optional<bool > implicit = None)
639+ BraceStmt *Body, Optional<bool > implicit = None)
640640 : LabeledConditionalStmt(StmtKind::Guard,
641641 getDefaultImplicitFlag (implicit, GuardLoc),
642642 LabeledStmtInfo(), Cond),
643643 GuardLoc(GuardLoc), Body(Body) {}
644644
645- GuardStmt (SourceLoc GuardLoc, Expr *Cond, Stmt *Body,
645+ GuardStmt (SourceLoc GuardLoc, Expr *Cond, BraceStmt *Body,
646646 Optional<bool > implicit, ASTContext &Ctx);
647647
648648 SourceLoc getGuardLoc () const { return GuardLoc; }
@@ -654,8 +654,8 @@ class GuardStmt : public LabeledConditionalStmt {
654654 return Body->getEndLoc ();
655655 }
656656
657- Stmt *getBody () const { return Body; }
658- void setBody (Stmt *s) { Body = s; }
657+ BraceStmt *getBody () const { return Body; }
658+ void setBody (BraceStmt *s) { Body = s; }
659659
660660 // Implement isa/cast/dyncast/etc.
661661 static bool classof (const Stmt *S) { return S->getKind () == StmtKind::Guard; }
@@ -945,13 +945,13 @@ class CaseStmt final
945945 SourceLoc ItemTerminatorLoc;
946946 CaseParentKind ParentKind;
947947
948- llvm::PointerIntPair<Stmt *, 1 , bool > BodyAndHasFallthrough;
948+ llvm::PointerIntPair<BraceStmt *, 1 , bool > BodyAndHasFallthrough;
949949
950950 Optional<MutableArrayRef<VarDecl *>> CaseBodyVariables;
951951
952952 CaseStmt (CaseParentKind ParentKind, SourceLoc ItemIntroducerLoc,
953953 ArrayRef<CaseLabelItem> CaseLabelItems, SourceLoc UnknownAttrLoc,
954- SourceLoc ItemTerminatorLoc, Stmt *Body,
954+ SourceLoc ItemTerminatorLoc, BraceStmt *Body,
955955 Optional<MutableArrayRef<VarDecl *>> CaseBodyVariables,
956956 Optional<bool > Implicit,
957957 NullablePtr<FallthroughStmt> fallthroughStmt);
@@ -960,7 +960,7 @@ class CaseStmt final
960960 static CaseStmt *
961961 create (ASTContext &C, CaseParentKind ParentKind, SourceLoc ItemIntroducerLoc,
962962 ArrayRef<CaseLabelItem> CaseLabelItems, SourceLoc UnknownAttrLoc,
963- SourceLoc ItemTerminatorLoc, Stmt *Body,
963+ SourceLoc ItemTerminatorLoc, BraceStmt *Body,
964964 Optional<MutableArrayRef<VarDecl *>> CaseBodyVariables,
965965 Optional<bool > Implicit = None,
966966 NullablePtr<FallthroughStmt> fallthroughStmt = nullptr );
@@ -997,8 +997,8 @@ class CaseStmt final
997997
998998 bool hasFallthroughDest () const { return BodyAndHasFallthrough.getInt (); }
999999
1000- Stmt *getBody () const { return BodyAndHasFallthrough.getPointer (); }
1001- void setBody (Stmt *body) { BodyAndHasFallthrough.setPointer (body); }
1000+ BraceStmt *getBody () const { return BodyAndHasFallthrough.getPointer (); }
1001+ void setBody (BraceStmt *body) { BodyAndHasFallthrough.setPointer (body); }
10021002
10031003 // / True if the case block declares any patterns with local variable bindings.
10041004 bool hasBoundDecls () const { return CaseBodyVariables.hasValue (); }
0 commit comments