@@ -482,45 +482,33 @@ class Portion : public ASTAllocated<ASTScopeImpl> {
482482
483483 virtual NullablePtr<ASTScopeImpl>
484484 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+ };
496486
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 () {}
499492
500- NullablePtr<const ASTScopeImpl>
501- getLookupLimitFor (const GenericTypeOrExtensionScope *) const override ;
493+ // Just for TypeAlias
494+ ASTScopeImpl *expandScope (GenericTypeOrExtensionScope *,
495+ ScopeCreator &) const override ;
502496
503- NullablePtr<ASTScopeImpl>
504- insertionPointForDeferredExpansion (IterableTypeScope *) const override ;
505- };
497+ SourceRange getChildlessSourceRangeOf (const GenericTypeOrExtensionScope *,
498+ bool omitAssertions) const override ;
506499
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 ;
512502
513- bool lookupMembersOf ( const GenericTypeOrExtensionScope *scope,
514- ASTScopeImpl::DeclConsumer consumer ) const override ;
503+ NullablePtr<ASTScopeImpl>
504+ insertionPointForDeferredExpansion (IterableTypeScope * ) const override ;
515505};
516506
517507// / Behavior specific to representing the trailing where clause of a
518508// / GenericTypeDecl or ExtensionDecl scope.
519- class GenericTypeOrExtensionWherePortion final
520- : public GenericTypeOrExtensionWhereOrBodyPortion {
509+ class GenericTypeOrExtensionWherePortion final : public Portion {
521510public:
522- GenericTypeOrExtensionWherePortion ()
523- : GenericTypeOrExtensionWhereOrBodyPortion(" Where" ) {}
511+ GenericTypeOrExtensionWherePortion () : Portion(" Where" ) {}
524512
525513 bool lookupMembersOf (const GenericTypeOrExtensionScope *scope,
526514 ASTScopeImpl::DeclConsumer consumer) const override ;
@@ -537,11 +525,12 @@ class GenericTypeOrExtensionWherePortion final
537525
538526// / Behavior specific to representing the Body of a NominalTypeDecl or
539527// / ExtensionDecl scope
540- class IterableTypeBodyPortion final
541- : public GenericTypeOrExtensionWhereOrBodyPortion {
528+ class IterableTypeBodyPortion final : public Portion {
542529public:
543- IterableTypeBodyPortion ()
544- : GenericTypeOrExtensionWhereOrBodyPortion(" Body" ) {}
530+ IterableTypeBodyPortion () : Portion(" Body" ) {}
531+
532+ bool lookupMembersOf (const GenericTypeOrExtensionScope *scope,
533+ ASTScopeImpl::DeclConsumer consumer) const override ;
545534
546535 ASTScopeImpl *expandScope (GenericTypeOrExtensionScope *,
547536 ScopeCreator &) const override ;
0 commit comments