@@ -1023,10 +1023,8 @@ class AbstractPatternEntryScope : public ASTScopeImpl {
1023
1023
public:
1024
1024
PatternBindingDecl *const decl;
1025
1025
const unsigned patternEntryIndex;
1026
- const bool isLocalBinding;
1027
1026
1028
- AbstractPatternEntryScope (PatternBindingDecl *, unsigned entryIndex,
1029
- bool );
1027
+ AbstractPatternEntryScope (PatternBindingDecl *, unsigned entryIndex);
1030
1028
virtual ~AbstractPatternEntryScope () {}
1031
1029
1032
1030
const PatternBindingEntry &getPatternEntry () const ;
@@ -1041,10 +1039,14 @@ class AbstractPatternEntryScope : public ASTScopeImpl {
1041
1039
};
1042
1040
1043
1041
class PatternEntryDeclScope final : public AbstractPatternEntryScope {
1042
+ const bool isLocalBinding;
1043
+ Optional<SourceLoc> endLoc;
1044
+
1044
1045
public:
1045
1046
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) {}
1048
1050
virtual ~PatternEntryDeclScope () {}
1049
1051
1050
1052
protected:
@@ -1070,9 +1072,8 @@ class PatternEntryInitializerScope final : public AbstractPatternEntryScope {
1070
1072
Expr *initAsWrittenWhenCreated;
1071
1073
1072
1074
public:
1073
- PatternEntryInitializerScope (PatternBindingDecl *pbDecl, unsigned entryIndex,
1074
- bool isLocalBinding)
1075
- : AbstractPatternEntryScope(pbDecl, entryIndex, isLocalBinding),
1075
+ PatternEntryInitializerScope (PatternBindingDecl *pbDecl, unsigned entryIndex)
1076
+ : AbstractPatternEntryScope(pbDecl, entryIndex),
1076
1077
initAsWrittenWhenCreated (pbDecl->getOriginalInit (entryIndex)) {}
1077
1078
virtual ~PatternEntryInitializerScope () {}
1078
1079
@@ -1400,7 +1401,8 @@ class WhileStmtScope final : public LabeledConditionalStmtScope {
1400
1401
class GuardStmtScope final : public LabeledConditionalStmtScope {
1401
1402
public:
1402
1403
GuardStmt *const stmt;
1403
- GuardStmtScope (GuardStmt *e) : stmt(e) {}
1404
+ SourceLoc endLoc;
1405
+ GuardStmtScope (GuardStmt *e, SourceLoc endLoc) : stmt(e), endLoc(endLoc) {}
1404
1406
virtual ~GuardStmtScope () {}
1405
1407
1406
1408
protected:
@@ -1413,6 +1415,8 @@ class GuardStmtScope final : public LabeledConditionalStmtScope {
1413
1415
public:
1414
1416
std::string getClassName () const override ;
1415
1417
LabeledConditionalStmt *getLabeledConditionalStmt () const override ;
1418
+ SourceRange
1419
+ getSourceRangeOfThisASTNode (bool omitAssertions = false ) const override ;
1416
1420
};
1417
1421
1418
1422
// / A scope after a guard statement that follows lookups into the conditions
@@ -1427,9 +1431,11 @@ class LookupParentDiversionScope final : public ASTScopeImpl {
1427
1431
public:
1428
1432
ASTScopeImpl *const lookupParent;
1429
1433
const SourceLoc startLoc;
1434
+ const SourceLoc endLoc;
1430
1435
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) {}
1433
1439
1434
1440
SourceRange
1435
1441
getSourceRangeOfThisASTNode (bool omitAssertions = false ) const override ;
0 commit comments