@@ -417,10 +417,6 @@ class ASTScopeImpl {
417417 static llvm::SmallVector<LabeledStmt *, 4 >
418418 lookupLabeledStmts (SourceFile *sourceFile, SourceLoc loc);
419419
420- static Optional<bool >
421- computeIsCascadingUse (ArrayRef<const ASTScopeImpl *> history,
422- Optional<bool > initialIsCascadingUse);
423-
424420 static std::pair<CaseStmt *, CaseStmt *>
425421 lookupFallthroughSourceAndDest (SourceFile *sourceFile, SourceLoc loc);
426422
@@ -448,7 +444,6 @@ class ASTScopeImpl {
448444 // / The main (recursive) lookup function:
449445 // / Tell DeclConsumer about all names found in this scope and if not done,
450446 // / recurse for enclosing scopes. Stop lookup if about to look in limit.
451- // / Return final value for isCascadingUse
452447 // /
453448 // / If the lookup depends on implicit self, selfDC is its context.
454449 // / (Names in extensions never depend on self.)
@@ -508,9 +503,6 @@ class ASTScopeImpl {
508503
509504#pragma mark - - lookup- local bindings
510505protected:
511- virtual Optional<bool >
512- resolveIsCascadingUseForThisScope (Optional<bool >) const ;
513-
514506 // A local binding is a basically a local variable defined in that very scope
515507 // It is not an instance variable or inherited type.
516508
@@ -611,11 +603,11 @@ class Portion {
611603 virtual ASTScopeImpl *expandScope (GenericTypeOrExtensionScope *,
612604 ScopeCreator &) const = 0;
613605
606+ // / \Returns \c true if this lookup is done looking for results, else \c false.
614607 virtual SourceRange
615608 getChildlessSourceRangeOf (const GenericTypeOrExtensionScope *scope,
616609 bool omitAssertions) const = 0 ;
617610
618- // / Returns isDone and isCascadingUse
619611 virtual bool lookupMembersOf (const GenericTypeOrExtensionScope *scope,
620612 ArrayRef<const ASTScopeImpl *>,
621613 ASTScopeImpl::DeclConsumer consumer) const ;
@@ -780,10 +772,6 @@ class GenericTypeOrExtensionScope : public ASTScopeImpl {
780772 virtual bool doesDeclHaveABody () const ;
781773 const char *portionName () const { return portion->portionName ; }
782774
783- protected:
784- Optional<bool > resolveIsCascadingUseForThisScope (
785- Optional<bool > isCascadingUse) const override ;
786-
787775public:
788776 // Only for DeclScope, not BodyScope
789777 // Returns the where clause scope, or the parent if none
@@ -969,8 +957,6 @@ class GenericParamScope final : public ASTScopeImpl {
969957protected:
970958 bool lookupLocalsOrMembers (ArrayRef<const ASTScopeImpl *>,
971959 DeclConsumer) const override ;
972- Optional<bool >
973- resolveIsCascadingUseForThisScope (Optional<bool >) const override ;
974960};
975961
976962// / Concrete class for a function/initializer/deinitializer
@@ -1014,9 +1000,6 @@ class AbstractFunctionDeclScope final : public ASTScopeImpl {
10141000
10151001protected:
10161002 NullablePtr<const GenericParamList> genericParams () const override ;
1017-
1018- Optional<bool >
1019- resolveIsCascadingUseForThisScope (Optional<bool >) const override ;
10201003};
10211004
10221005// / The parameters for an abstract function (init/func/deinit)., subscript, and
@@ -1087,8 +1070,6 @@ class AbstractFunctionBodyScope : public ASTScopeImpl {
10871070protected:
10881071 bool lookupLocalsOrMembers (ArrayRef<const ASTScopeImpl *>,
10891072 DeclConsumer) const override ;
1090- Optional<bool >
1091- resolveIsCascadingUseForThisScope (Optional<bool >) const override ;
10921073
10931074public:
10941075 NullablePtr<ASTScopeImpl> insertionPointForDeferredExpansion () override ;
@@ -1123,10 +1104,6 @@ class DefaultArgumentInitializerScope final : public ASTScopeImpl {
11231104 virtual NullablePtr<DeclContext> getDeclContext () const override ;
11241105 virtual NullablePtr<Decl> getDeclIfAny () const override { return decl; }
11251106 Decl *getDecl () const { return decl; }
1126-
1127- protected:
1128- Optional<bool >
1129- resolveIsCascadingUseForThisScope (Optional<bool >) const override ;
11301107};
11311108
11321109// / Consider:
@@ -1274,9 +1251,6 @@ class PatternEntryInitializerScope final : public AbstractPatternEntryScope {
12741251protected:
12751252 bool lookupLocalsOrMembers (ArrayRef<const ASTScopeImpl *>,
12761253 DeclConsumer) const override ;
1277-
1278- Optional<bool >
1279- resolveIsCascadingUseForThisScope (Optional<bool >) const override ;
12801254};
12811255
12821256// / The scope introduced by a conditional clause in an if/guard/while
@@ -1402,8 +1376,6 @@ class ClosureParametersScope final : public ASTScopeImpl {
14021376protected:
14031377 bool lookupLocalsOrMembers (ArrayRef<const ASTScopeImpl *>,
14041378 DeclConsumer) const override ;
1405- Optional<bool > resolveIsCascadingUseForThisScope (
1406- Optional<bool > isCascadingUse) const override ;
14071379};
14081380
14091381class TopLevelCodeScope final : public ASTScopeImpl {
0 commit comments