@@ -482,45 +482,33 @@ class Portion : public ASTAllocated<ASTScopeImpl> {
482
482
483
483
virtual NullablePtr<ASTScopeImpl>
484
484
insertionPointForDeferredExpansion (IterableTypeScope *) const = 0 ;
485
- };
486
-
487
- // For the whole Decl scope of a GenericType or an Extension
488
- class GenericTypeOrExtensionWholePortion final : public Portion {
489
- public:
490
- GenericTypeOrExtensionWholePortion () : Portion(" Decl" ) {}
491
- virtual ~GenericTypeOrExtensionWholePortion () {}
492
-
493
- // Just for TypeAlias
494
- ASTScopeImpl *expandScope (GenericTypeOrExtensionScope *,
495
- ScopeCreator &) const override ;
485
+ };
496
486
497
- SourceRange getChildlessSourceRangeOf (const GenericTypeOrExtensionScope *,
498
- bool omitAssertions) const override ;
487
+ // For the whole Decl scope of a GenericType or an Extension
488
+ class GenericTypeOrExtensionWholePortion final : public Portion {
489
+ public:
490
+ GenericTypeOrExtensionWholePortion () : Portion(" Decl" ) {}
491
+ virtual ~GenericTypeOrExtensionWholePortion () {}
499
492
500
- NullablePtr<const ASTScopeImpl>
501
- getLookupLimitFor (const GenericTypeOrExtensionScope *) const override ;
493
+ // Just for TypeAlias
494
+ ASTScopeImpl *expandScope (GenericTypeOrExtensionScope *,
495
+ ScopeCreator &) const override ;
502
496
503
- NullablePtr<ASTScopeImpl>
504
- insertionPointForDeferredExpansion (IterableTypeScope *) const override ;
505
- };
497
+ SourceRange getChildlessSourceRangeOf (const GenericTypeOrExtensionScope *,
498
+ bool omitAssertions) const override ;
506
499
507
- // / GenericTypeOrExtension = GenericType or Extension
508
- class GenericTypeOrExtensionWhereOrBodyPortion : public Portion {
509
- public:
510
- GenericTypeOrExtensionWhereOrBodyPortion (const char *n) : Portion(n) {}
511
- virtual ~GenericTypeOrExtensionWhereOrBodyPortion () {}
500
+ NullablePtr<const ASTScopeImpl>
501
+ getLookupLimitFor (const GenericTypeOrExtensionScope *) const override ;
512
502
513
- bool lookupMembersOf ( const GenericTypeOrExtensionScope *scope,
514
- ASTScopeImpl::DeclConsumer consumer ) const override ;
503
+ NullablePtr<ASTScopeImpl>
504
+ insertionPointForDeferredExpansion (IterableTypeScope * ) const override ;
515
505
};
516
506
517
507
// / Behavior specific to representing the trailing where clause of a
518
508
// / GenericTypeDecl or ExtensionDecl scope.
519
- class GenericTypeOrExtensionWherePortion final
520
- : public GenericTypeOrExtensionWhereOrBodyPortion {
509
+ class GenericTypeOrExtensionWherePortion final : public Portion {
521
510
public:
522
- GenericTypeOrExtensionWherePortion ()
523
- : GenericTypeOrExtensionWhereOrBodyPortion(" Where" ) {}
511
+ GenericTypeOrExtensionWherePortion () : Portion(" Where" ) {}
524
512
525
513
bool lookupMembersOf (const GenericTypeOrExtensionScope *scope,
526
514
ASTScopeImpl::DeclConsumer consumer) const override ;
@@ -537,11 +525,12 @@ class GenericTypeOrExtensionWherePortion final
537
525
538
526
// / Behavior specific to representing the Body of a NominalTypeDecl or
539
527
// / ExtensionDecl scope
540
- class IterableTypeBodyPortion final
541
- : public GenericTypeOrExtensionWhereOrBodyPortion {
528
+ class IterableTypeBodyPortion final : public Portion {
542
529
public:
543
- IterableTypeBodyPortion ()
544
- : GenericTypeOrExtensionWhereOrBodyPortion(" Body" ) {}
530
+ IterableTypeBodyPortion () : Portion(" Body" ) {}
531
+
532
+ bool lookupMembersOf (const GenericTypeOrExtensionScope *scope,
533
+ ASTScopeImpl::DeclConsumer consumer) const override ;
545
534
546
535
ASTScopeImpl *expandScope (GenericTypeOrExtensionScope *,
547
536
ScopeCreator &) const override ;
0 commit comments