@@ -417,10 +417,6 @@ class ASTScopeImpl {
417
417
static llvm::SmallVector<LabeledStmt *, 4 >
418
418
lookupLabeledStmts (SourceFile *sourceFile, SourceLoc loc);
419
419
420
- static Optional<bool >
421
- computeIsCascadingUse (ArrayRef<const ASTScopeImpl *> history,
422
- Optional<bool > initialIsCascadingUse);
423
-
424
420
static std::pair<CaseStmt *, CaseStmt *>
425
421
lookupFallthroughSourceAndDest (SourceFile *sourceFile, SourceLoc loc);
426
422
@@ -448,7 +444,6 @@ class ASTScopeImpl {
448
444
// / The main (recursive) lookup function:
449
445
// / Tell DeclConsumer about all names found in this scope and if not done,
450
446
// / recurse for enclosing scopes. Stop lookup if about to look in limit.
451
- // / Return final value for isCascadingUse
452
447
// /
453
448
// / If the lookup depends on implicit self, selfDC is its context.
454
449
// / (Names in extensions never depend on self.)
@@ -508,9 +503,6 @@ class ASTScopeImpl {
508
503
509
504
#pragma mark - - lookup- local bindings
510
505
protected:
511
- virtual Optional<bool >
512
- resolveIsCascadingUseForThisScope (Optional<bool >) const ;
513
-
514
506
// A local binding is a basically a local variable defined in that very scope
515
507
// It is not an instance variable or inherited type.
516
508
@@ -611,11 +603,11 @@ class Portion {
611
603
virtual ASTScopeImpl *expandScope (GenericTypeOrExtensionScope *,
612
604
ScopeCreator &) const = 0;
613
605
606
+ // / \Returns \c true if this lookup is done looking for results, else \c false.
614
607
virtual SourceRange
615
608
getChildlessSourceRangeOf (const GenericTypeOrExtensionScope *scope,
616
609
bool omitAssertions) const = 0 ;
617
610
618
- // / Returns isDone and isCascadingUse
619
611
virtual bool lookupMembersOf (const GenericTypeOrExtensionScope *scope,
620
612
ArrayRef<const ASTScopeImpl *>,
621
613
ASTScopeImpl::DeclConsumer consumer) const ;
@@ -780,10 +772,6 @@ class GenericTypeOrExtensionScope : public ASTScopeImpl {
780
772
virtual bool doesDeclHaveABody () const ;
781
773
const char *portionName () const { return portion->portionName ; }
782
774
783
- protected:
784
- Optional<bool > resolveIsCascadingUseForThisScope (
785
- Optional<bool > isCascadingUse) const override ;
786
-
787
775
public:
788
776
// Only for DeclScope, not BodyScope
789
777
// Returns the where clause scope, or the parent if none
@@ -969,8 +957,6 @@ class GenericParamScope final : public ASTScopeImpl {
969
957
protected:
970
958
bool lookupLocalsOrMembers (ArrayRef<const ASTScopeImpl *>,
971
959
DeclConsumer) const override ;
972
- Optional<bool >
973
- resolveIsCascadingUseForThisScope (Optional<bool >) const override ;
974
960
};
975
961
976
962
// / Concrete class for a function/initializer/deinitializer
@@ -1014,9 +1000,6 @@ class AbstractFunctionDeclScope final : public ASTScopeImpl {
1014
1000
1015
1001
protected:
1016
1002
NullablePtr<const GenericParamList> genericParams () const override ;
1017
-
1018
- Optional<bool >
1019
- resolveIsCascadingUseForThisScope (Optional<bool >) const override ;
1020
1003
};
1021
1004
1022
1005
// / The parameters for an abstract function (init/func/deinit)., subscript, and
@@ -1087,8 +1070,6 @@ class AbstractFunctionBodyScope : public ASTScopeImpl {
1087
1070
protected:
1088
1071
bool lookupLocalsOrMembers (ArrayRef<const ASTScopeImpl *>,
1089
1072
DeclConsumer) const override ;
1090
- Optional<bool >
1091
- resolveIsCascadingUseForThisScope (Optional<bool >) const override ;
1092
1073
1093
1074
public:
1094
1075
NullablePtr<ASTScopeImpl> insertionPointForDeferredExpansion () override ;
@@ -1123,10 +1104,6 @@ class DefaultArgumentInitializerScope final : public ASTScopeImpl {
1123
1104
virtual NullablePtr<DeclContext> getDeclContext () const override ;
1124
1105
virtual NullablePtr<Decl> getDeclIfAny () const override { return decl; }
1125
1106
Decl *getDecl () const { return decl; }
1126
-
1127
- protected:
1128
- Optional<bool >
1129
- resolveIsCascadingUseForThisScope (Optional<bool >) const override ;
1130
1107
};
1131
1108
1132
1109
// / Consider:
@@ -1274,9 +1251,6 @@ class PatternEntryInitializerScope final : public AbstractPatternEntryScope {
1274
1251
protected:
1275
1252
bool lookupLocalsOrMembers (ArrayRef<const ASTScopeImpl *>,
1276
1253
DeclConsumer) const override ;
1277
-
1278
- Optional<bool >
1279
- resolveIsCascadingUseForThisScope (Optional<bool >) const override ;
1280
1254
};
1281
1255
1282
1256
// / The scope introduced by a conditional clause in an if/guard/while
@@ -1402,8 +1376,6 @@ class ClosureParametersScope final : public ASTScopeImpl {
1402
1376
protected:
1403
1377
bool lookupLocalsOrMembers (ArrayRef<const ASTScopeImpl *>,
1404
1378
DeclConsumer) const override ;
1405
- Optional<bool > resolveIsCascadingUseForThisScope (
1406
- Optional<bool > isCascadingUse) const override ;
1407
1379
};
1408
1380
1409
1381
class TopLevelCodeScope final : public ASTScopeImpl {
0 commit comments