@@ -194,10 +194,6 @@ class ASTScopeImpl {
194194#pragma mark - source ranges
195195
196196public:
197- // / Return signum of ranges. Centralize the invariant that ASTScopes use ends.
198- static int compare (SourceRange, SourceRange, const SourceManager &,
199- bool ensureDisjoint);
200-
201197 CharSourceRange getCharSourceRangeOfScope (SourceManager &SM,
202198 bool omitAssertions = false ) const ;
203199 bool isCharSourceRangeCached () const ;
@@ -224,7 +220,6 @@ class ASTScopeImpl {
224220 virtual NullablePtr<DeclAttribute> getDeclAttributeIfAny () const {
225221 return nullptr ;
226222 }
227- virtual NullablePtr<const void > getReferrent () const { return nullptr ; }
228223
229224#pragma mark - debugging and printing
230225
@@ -470,9 +465,6 @@ class Portion {
470465 virtual NullablePtr<const ASTScopeImpl>
471466 getLookupLimitFor (const GenericTypeOrExtensionScope *) const ;
472467
473- virtual const Decl *
474- getReferrentOfScope (const GenericTypeOrExtensionScope *s) const ;
475-
476468 virtual NullablePtr<ASTScopeImpl>
477469 insertionPointForDeferredExpansion (IterableTypeScope *) const = 0 ;
478470 };
@@ -493,9 +485,6 @@ class Portion {
493485 NullablePtr<const ASTScopeImpl>
494486 getLookupLimitFor (const GenericTypeOrExtensionScope *) const override ;
495487
496- const Decl *
497- getReferrentOfScope (const GenericTypeOrExtensionScope *s) const override ;
498-
499488 NullablePtr<ASTScopeImpl>
500489 insertionPointForDeferredExpansion (IterableTypeScope *) const override ;
501490 };
@@ -570,7 +559,6 @@ class GenericTypeOrExtensionScope : public ASTScopeImpl {
570559
571560 virtual Decl *getDecl () const = 0;
572561 NullablePtr<Decl> getDeclIfAny () const override { return getDecl (); }
573- NullablePtr<const void > getReferrent () const override ;
574562
575563private:
576564 AnnotatedInsertionPoint
@@ -745,7 +733,6 @@ class GenericParamScope final : public ASTScopeImpl {
745733
746734 // / Actually holder is always a GenericContext, need to test if
747735 // / ProtocolDecl or SubscriptDecl but will refactor later.
748- NullablePtr<const void > getReferrent () const override ;
749736 std::string getClassName () const override ;
750737 SourceRange
751738 getSourceRangeOfThisASTNode (bool omitAssertions = false ) const override ;
@@ -788,8 +775,6 @@ class AbstractFunctionDeclScope final : public ASTScopeImpl {
788775 virtual NullablePtr<Decl> getDeclIfAny () const override { return decl; }
789776 Decl *getDecl () const { return decl; }
790777
791- NullablePtr<const void > getReferrent () const override ;
792-
793778protected:
794779 NullablePtr<const GenericParamList> genericParams () const override ;
795780};
@@ -902,7 +887,6 @@ class AttachedPropertyWrapperScope final : public ASTScopeImpl {
902887 NullablePtr<DeclAttribute> getDeclAttributeIfAny () const override {
903888 return attr;
904889 }
905- NullablePtr<const void > getReferrent () const override ;
906890
907891private:
908892 void expandAScopeThatDoesNotCreateANewInsertionPoint (ScopeCreator &);
@@ -970,8 +954,6 @@ class PatternEntryDeclScope final : public AbstractPatternEntryScope {
970954 SourceRange
971955 getSourceRangeOfThisASTNode (bool omitAssertions = false ) const override ;
972956
973- NullablePtr<const void > getReferrent () const override ;
974-
975957protected:
976958 bool lookupLocalsOrMembers (DeclConsumer) const override ;
977959 bool isLabeledStmtLookupTerminator () const override ;
@@ -1072,7 +1054,6 @@ class CaptureListScope final : public ASTScopeImpl {
10721054 getSourceRangeOfThisASTNode (bool omitAssertions = false ) const override ;
10731055 NullablePtr<Expr> getExprIfAny () const override { return expr; }
10741056 Expr *getExpr () const { return expr; }
1075- NullablePtr<const void > getReferrent () const override ;
10761057 bool lookupLocalsOrMembers (DeclConsumer) const override ;
10771058};
10781059
@@ -1094,7 +1075,6 @@ class ClosureParametersScope final : public ASTScopeImpl {
10941075 }
10951076 NullablePtr<Expr> getExprIfAny () const override { return closureExpr; }
10961077 Expr *getExpr () const { return closureExpr; }
1097- NullablePtr<const void > getReferrent () const override ;
10981078
10991079protected:
11001080 ASTScopeImpl *expandSpecifically (ScopeCreator &scopeCreator) override ;
@@ -1128,7 +1108,6 @@ class TopLevelCodeScope final : public ASTScopeImpl {
11281108 getSourceRangeOfThisASTNode (bool omitAssertions = false ) const override ;
11291109 virtual NullablePtr<Decl> getDeclIfAny () const override { return decl; }
11301110 Decl *getDecl () const { return decl; }
1131- NullablePtr<const void > getReferrent () const override ;
11321111};
11331112
11341113// / The \c _@specialize attribute.
@@ -1153,7 +1132,6 @@ class SpecializeAttributeScope final : public ASTScopeImpl {
11531132 NullablePtr<DeclAttribute> getDeclAttributeIfAny () const override {
11541133 return specializeAttr;
11551134 }
1156- NullablePtr<const void > getReferrent () const override ;
11571135
11581136protected:
11591137 ASTScopeImpl *expandSpecifically (ScopeCreator &) override ;
@@ -1183,7 +1161,6 @@ class DifferentiableAttributeScope final : public ASTScopeImpl {
11831161 NullablePtr<DeclAttribute> getDeclAttributeIfAny () const override {
11841162 return differentiableAttr;
11851163 }
1186- NullablePtr<const void > getReferrent () const override ;
11871164
11881165protected:
11891166 ASTScopeImpl *expandSpecifically (ScopeCreator &) override ;
@@ -1214,7 +1191,6 @@ class SubscriptDeclScope final : public ASTScopeImpl {
12141191public:
12151192 virtual NullablePtr<Decl> getDeclIfAny () const override { return decl; }
12161193 Decl *getDecl () const { return decl; }
1217- NullablePtr<const void > getReferrent () const override ;
12181194
12191195protected:
12201196 NullablePtr<const GenericParamList> genericParams () const override ;
@@ -1244,7 +1220,6 @@ class AbstractStmtScope : public ASTScopeImpl {
12441220 getSourceRangeOfThisASTNode (bool omitAssertions = false ) const override ;
12451221 virtual Stmt *getStmt () const = 0;
12461222 NullablePtr<Stmt> getStmtIfAny () const override { return getStmt (); }
1247- NullablePtr<const void > getReferrent () const override ;
12481223
12491224protected:
12501225 bool isLabeledStmtLookupTerminator () const override ;
0 commit comments