@@ -194,10 +194,6 @@ class ASTScopeImpl {
194
194
#pragma mark - source ranges
195
195
196
196
public:
197
- // / Return signum of ranges. Centralize the invariant that ASTScopes use ends.
198
- static int compare (SourceRange, SourceRange, const SourceManager &,
199
- bool ensureDisjoint);
200
-
201
197
CharSourceRange getCharSourceRangeOfScope (SourceManager &SM,
202
198
bool omitAssertions = false ) const ;
203
199
bool isCharSourceRangeCached () const ;
@@ -224,7 +220,6 @@ class ASTScopeImpl {
224
220
virtual NullablePtr<DeclAttribute> getDeclAttributeIfAny () const {
225
221
return nullptr ;
226
222
}
227
- virtual NullablePtr<const void > getReferrent () const { return nullptr ; }
228
223
229
224
#pragma mark - debugging and printing
230
225
@@ -470,9 +465,6 @@ class Portion {
470
465
virtual NullablePtr<const ASTScopeImpl>
471
466
getLookupLimitFor (const GenericTypeOrExtensionScope *) const ;
472
467
473
- virtual const Decl *
474
- getReferrentOfScope (const GenericTypeOrExtensionScope *s) const ;
475
-
476
468
virtual NullablePtr<ASTScopeImpl>
477
469
insertionPointForDeferredExpansion (IterableTypeScope *) const = 0 ;
478
470
};
@@ -493,9 +485,6 @@ class Portion {
493
485
NullablePtr<const ASTScopeImpl>
494
486
getLookupLimitFor (const GenericTypeOrExtensionScope *) const override ;
495
487
496
- const Decl *
497
- getReferrentOfScope (const GenericTypeOrExtensionScope *s) const override ;
498
-
499
488
NullablePtr<ASTScopeImpl>
500
489
insertionPointForDeferredExpansion (IterableTypeScope *) const override ;
501
490
};
@@ -570,7 +559,6 @@ class GenericTypeOrExtensionScope : public ASTScopeImpl {
570
559
571
560
virtual Decl *getDecl () const = 0;
572
561
NullablePtr<Decl> getDeclIfAny () const override { return getDecl (); }
573
- NullablePtr<const void > getReferrent () const override ;
574
562
575
563
private:
576
564
AnnotatedInsertionPoint
@@ -745,7 +733,6 @@ class GenericParamScope final : public ASTScopeImpl {
745
733
746
734
// / Actually holder is always a GenericContext, need to test if
747
735
// / ProtocolDecl or SubscriptDecl but will refactor later.
748
- NullablePtr<const void > getReferrent () const override ;
749
736
std::string getClassName () const override ;
750
737
SourceRange
751
738
getSourceRangeOfThisASTNode (bool omitAssertions = false ) const override ;
@@ -788,8 +775,6 @@ class AbstractFunctionDeclScope final : public ASTScopeImpl {
788
775
virtual NullablePtr<Decl> getDeclIfAny () const override { return decl; }
789
776
Decl *getDecl () const { return decl; }
790
777
791
- NullablePtr<const void > getReferrent () const override ;
792
-
793
778
protected:
794
779
NullablePtr<const GenericParamList> genericParams () const override ;
795
780
};
@@ -902,7 +887,6 @@ class AttachedPropertyWrapperScope final : public ASTScopeImpl {
902
887
NullablePtr<DeclAttribute> getDeclAttributeIfAny () const override {
903
888
return attr;
904
889
}
905
- NullablePtr<const void > getReferrent () const override ;
906
890
907
891
private:
908
892
void expandAScopeThatDoesNotCreateANewInsertionPoint (ScopeCreator &);
@@ -970,8 +954,6 @@ class PatternEntryDeclScope final : public AbstractPatternEntryScope {
970
954
SourceRange
971
955
getSourceRangeOfThisASTNode (bool omitAssertions = false ) const override ;
972
956
973
- NullablePtr<const void > getReferrent () const override ;
974
-
975
957
protected:
976
958
bool lookupLocalsOrMembers (DeclConsumer) const override ;
977
959
bool isLabeledStmtLookupTerminator () const override ;
@@ -1072,7 +1054,6 @@ class CaptureListScope final : public ASTScopeImpl {
1072
1054
getSourceRangeOfThisASTNode (bool omitAssertions = false ) const override ;
1073
1055
NullablePtr<Expr> getExprIfAny () const override { return expr; }
1074
1056
Expr *getExpr () const { return expr; }
1075
- NullablePtr<const void > getReferrent () const override ;
1076
1057
bool lookupLocalsOrMembers (DeclConsumer) const override ;
1077
1058
};
1078
1059
@@ -1094,7 +1075,6 @@ class ClosureParametersScope final : public ASTScopeImpl {
1094
1075
}
1095
1076
NullablePtr<Expr> getExprIfAny () const override { return closureExpr; }
1096
1077
Expr *getExpr () const { return closureExpr; }
1097
- NullablePtr<const void > getReferrent () const override ;
1098
1078
1099
1079
protected:
1100
1080
ASTScopeImpl *expandSpecifically (ScopeCreator &scopeCreator) override ;
@@ -1128,7 +1108,6 @@ class TopLevelCodeScope final : public ASTScopeImpl {
1128
1108
getSourceRangeOfThisASTNode (bool omitAssertions = false ) const override ;
1129
1109
virtual NullablePtr<Decl> getDeclIfAny () const override { return decl; }
1130
1110
Decl *getDecl () const { return decl; }
1131
- NullablePtr<const void > getReferrent () const override ;
1132
1111
};
1133
1112
1134
1113
// / The \c _@specialize attribute.
@@ -1153,7 +1132,6 @@ class SpecializeAttributeScope final : public ASTScopeImpl {
1153
1132
NullablePtr<DeclAttribute> getDeclAttributeIfAny () const override {
1154
1133
return specializeAttr;
1155
1134
}
1156
- NullablePtr<const void > getReferrent () const override ;
1157
1135
1158
1136
protected:
1159
1137
ASTScopeImpl *expandSpecifically (ScopeCreator &) override ;
@@ -1183,7 +1161,6 @@ class DifferentiableAttributeScope final : public ASTScopeImpl {
1183
1161
NullablePtr<DeclAttribute> getDeclAttributeIfAny () const override {
1184
1162
return differentiableAttr;
1185
1163
}
1186
- NullablePtr<const void > getReferrent () const override ;
1187
1164
1188
1165
protected:
1189
1166
ASTScopeImpl *expandSpecifically (ScopeCreator &) override ;
@@ -1214,7 +1191,6 @@ class SubscriptDeclScope final : public ASTScopeImpl {
1214
1191
public:
1215
1192
virtual NullablePtr<Decl> getDeclIfAny () const override { return decl; }
1216
1193
Decl *getDecl () const { return decl; }
1217
- NullablePtr<const void > getReferrent () const override ;
1218
1194
1219
1195
protected:
1220
1196
NullablePtr<const GenericParamList> genericParams () const override ;
@@ -1244,7 +1220,6 @@ class AbstractStmtScope : public ASTScopeImpl {
1244
1220
getSourceRangeOfThisASTNode (bool omitAssertions = false ) const override ;
1245
1221
virtual Stmt *getStmt () const = 0;
1246
1222
NullablePtr<Stmt> getStmtIfAny () const override { return getStmt (); }
1247
- NullablePtr<const void > getReferrent () const override ;
1248
1223
1249
1224
protected:
1250
1225
bool isLabeledStmtLookupTerminator () const override ;
0 commit comments