@@ -1023,10 +1023,8 @@ class AbstractPatternEntryScope : public ASTScopeImpl {
10231023public:
10241024 PatternBindingDecl *const decl;
10251025 const unsigned patternEntryIndex;
1026- const bool isLocalBinding;
10271026
1028- AbstractPatternEntryScope (PatternBindingDecl *, unsigned entryIndex,
1029- bool );
1027+ AbstractPatternEntryScope (PatternBindingDecl *, unsigned entryIndex);
10301028 virtual ~AbstractPatternEntryScope () {}
10311029
10321030 const PatternBindingEntry &getPatternEntry () const ;
@@ -1041,10 +1039,14 @@ class AbstractPatternEntryScope : public ASTScopeImpl {
10411039};
10421040
10431041class PatternEntryDeclScope final : public AbstractPatternEntryScope {
1042+ const bool isLocalBinding;
1043+ Optional<SourceLoc> endLoc;
1044+
10441045public:
10451046 PatternEntryDeclScope (PatternBindingDecl *pbDecl, unsigned entryIndex,
1046- bool isLocalBinding)
1047- : AbstractPatternEntryScope(pbDecl, entryIndex, isLocalBinding) {}
1047+ bool isLocalBinding, Optional<SourceLoc> endLoc)
1048+ : AbstractPatternEntryScope(pbDecl, entryIndex),
1049+ isLocalBinding (isLocalBinding), endLoc(endLoc) {}
10481050 virtual ~PatternEntryDeclScope () {}
10491051
10501052protected:
@@ -1070,9 +1072,8 @@ class PatternEntryInitializerScope final : public AbstractPatternEntryScope {
10701072 Expr *initAsWrittenWhenCreated;
10711073
10721074public:
1073- PatternEntryInitializerScope (PatternBindingDecl *pbDecl, unsigned entryIndex,
1074- bool isLocalBinding)
1075- : AbstractPatternEntryScope(pbDecl, entryIndex, isLocalBinding),
1075+ PatternEntryInitializerScope (PatternBindingDecl *pbDecl, unsigned entryIndex)
1076+ : AbstractPatternEntryScope(pbDecl, entryIndex),
10761077 initAsWrittenWhenCreated (pbDecl->getOriginalInit (entryIndex)) {}
10771078 virtual ~PatternEntryInitializerScope () {}
10781079
@@ -1400,7 +1401,8 @@ class WhileStmtScope final : public LabeledConditionalStmtScope {
14001401class GuardStmtScope final : public LabeledConditionalStmtScope {
14011402public:
14021403 GuardStmt *const stmt;
1403- GuardStmtScope (GuardStmt *e) : stmt(e) {}
1404+ SourceLoc endLoc;
1405+ GuardStmtScope (GuardStmt *e, SourceLoc endLoc) : stmt(e), endLoc(endLoc) {}
14041406 virtual ~GuardStmtScope () {}
14051407
14061408protected:
@@ -1413,6 +1415,8 @@ class GuardStmtScope final : public LabeledConditionalStmtScope {
14131415public:
14141416 std::string getClassName () const override ;
14151417 LabeledConditionalStmt *getLabeledConditionalStmt () const override ;
1418+ SourceRange
1419+ getSourceRangeOfThisASTNode (bool omitAssertions = false ) const override ;
14161420};
14171421
14181422// / A scope after a guard statement that follows lookups into the conditions
@@ -1427,9 +1431,11 @@ class LookupParentDiversionScope final : public ASTScopeImpl {
14271431public:
14281432 ASTScopeImpl *const lookupParent;
14291433 const SourceLoc startLoc;
1434+ const SourceLoc endLoc;
14301435
1431- LookupParentDiversionScope (ASTScopeImpl *lookupParent, SourceLoc startLoc)
1432- : lookupParent(lookupParent), startLoc(startLoc) {}
1436+ LookupParentDiversionScope (ASTScopeImpl *lookupParent,
1437+ SourceLoc startLoc, SourceLoc endLoc)
1438+ : lookupParent(lookupParent), startLoc(startLoc), endLoc(endLoc) {}
14331439
14341440 SourceRange
14351441 getSourceRangeOfThisASTNode (bool omitAssertions = false ) const override ;
0 commit comments