Skip to content

Commit 69afa80

Browse files
author
David Ungar
committed
Don't need createGenericParametersIfMissing
1 parent a127d78 commit 69afa80

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

lib/AST/ASTScopeCreation.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -859,6 +859,7 @@ class NodeAdder
859859
VISIT_AND_CREATE_WHOLE_PORTION(ExtensionDecl, ExtensionScope)
860860
VISIT_AND_CREATE_WHOLE_PORTION(StructDecl, NominalTypeScope)
861861
VISIT_AND_CREATE_WHOLE_PORTION(ClassDecl, NominalTypeScope)
862+
VISIT_AND_CREATE_WHOLE_PORTION(ProtocolDecl, NominalTypeScope)
862863
VISIT_AND_CREATE_WHOLE_PORTION(EnumDecl, NominalTypeScope)
863864
VISIT_AND_CREATE_WHOLE_PORTION(TypeAliasDecl, TypeAliasScope)
864865
VISIT_AND_CREATE_WHOLE_PORTION(OpaqueTypeDecl, OpaqueTypeScope)
@@ -871,12 +872,6 @@ class NodeAdder
871872
return visitAbstractFunctionDecl(ad, p, scopeCreator);
872873
}
873874

874-
NullablePtr<ASTScopeImpl> visitProtocolDecl(ProtocolDecl *e, ASTScopeImpl *p,
875-
ScopeCreator &scopeCreator) {
876-
return scopeCreator.ifUniqueConstructWithPortionExpandAndInsert<
877-
NominalTypeScope, GenericTypeOrExtensionWholePortion>(p, e);
878-
}
879-
880875
#pragma mark simple creation with deferred nodes
881876

882877
// Each of the following creates a new scope, so that nodes which were parsed

0 commit comments

Comments
 (0)