Skip to content

Commit ec42da0

Browse files
committed
Sema: Fix quadratic checkFunctionErrorHandling() in WMO mode
1 parent 88b785c commit ec42da0

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/Sema/TypeChecker.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,7 @@ static void typeCheckFunctionsAndExternalDecls(SourceFile &SF, TypeChecker &TC)
460460

461461
if (auto *AFD = dyn_cast<AbstractFunctionDecl>(decl)) {
462462
TC.typeCheckAbstractFunctionBody(AFD);
463+
TC.checkFunctionErrorHandling(AFD);
463464
continue;
464465
}
465466
if (isa<NominalTypeDecl>(decl)) {
@@ -559,11 +560,6 @@ static void typeCheckFunctionsAndExternalDecls(SourceFile &SF, TypeChecker &TC)
559560
for (AbstractFunctionDecl *FD : TC.definedFunctions) {
560561
TC.checkFunctionErrorHandling(FD);
561562
}
562-
for (auto decl : TC.Context.ExternalDefinitions) {
563-
if (auto fn = dyn_cast<AbstractFunctionDecl>(decl)) {
564-
TC.checkFunctionErrorHandling(fn);
565-
}
566-
}
567563
}
568564

569565
void swift::typeCheckExternalDefinitions(SourceFile &SF) {

0 commit comments

Comments
 (0)