@@ -586,6 +586,8 @@ CREATES_NEW_INSERTION_POINT(PatternEntryInitializerScope)
586
586
CREATES_NEW_INSERTION_POINT(PatternEntryUseScope)
587
587
CREATES_NEW_INSERTION_POINT(GenericTypeOrExtensionScope)
588
588
CREATES_NEW_INSERTION_POINT(BraceStmtScope)
589
+ CREATES_NEW_INSERTION_POINT(TopLevelCodeScope)
590
+
589
591
590
592
NO_NEW_INSERTION_POINT(AbstractFunctionBodyScope)
591
593
NO_NEW_INSERTION_POINT(AbstractFunctionDeclScope)
@@ -601,7 +603,6 @@ NO_NEW_INSERTION_POINT(IfStmtScope)
601
603
NO_NEW_INSERTION_POINT(RepeatWhileScope)
602
604
NO_NEW_INSERTION_POINT(SubscriptDeclScope)
603
605
NO_NEW_INSERTION_POINT(SwitchStmtScope)
604
- NO_NEW_INSERTION_POINT(TopLevelCodeScope)
605
606
NO_NEW_INSERTION_POINT(VarDeclScope)
606
607
NO_NEW_INSERTION_POINT(WhileStmtScope)
607
608
NO_NEW_INSERTION_POINT(WholeClosureScope)
@@ -715,6 +716,12 @@ ASTScopeImpl *BraceStmtScope::expandAScopeThatCreatesANewInsertionPoint(
715
716
return scopeCreator.addScopesToTree (this , stmt->getElements ());
716
717
}
717
718
719
+ ASTScopeImpl *TopLevelCodeScope::expandAScopeThatCreatesANewInsertionPoint (
720
+ ScopeCreator &scopeCreator) {
721
+ return scopeCreator.createSubtree <BraceStmtScope>(this , decl->getBody ());
722
+ }
723
+
724
+
718
725
#pragma mark expandAScopeThatDoesNotCreateANewInsertionPoint
719
726
720
727
void ASTSourceFileScope::expandAScopeThatDoesNotCreateANewInsertionPoint (
@@ -886,11 +893,6 @@ void ClosureBodyScope::expandAScopeThatDoesNotCreateANewInsertionPoint(
886
893
scopeCreator.createSubtree <BraceStmtScope>(this , closureExpr->getBody ());
887
894
}
888
895
889
- void TopLevelCodeScope::expandAScopeThatDoesNotCreateANewInsertionPoint (
890
- ScopeCreator &scopeCreator) {
891
- scopeCreator.createSubtree <BraceStmtScope>(this , decl->getBody ());
892
- }
893
-
894
896
void DefaultArgumentInitializerScope::
895
897
expandAScopeThatDoesNotCreateANewInsertionPoint (
896
898
ScopeCreator &scopeCreator) {
0 commit comments