Skip to content

Commit 27e3d9f

Browse files
committed
Remove an unnecessary call to createTypeChecker
We appear to always have a TypeChecker registered at this point.
1 parent 41ab235 commit 27e3d9f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Sema/TypeChecker.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,8 @@ bool swift::performTypeLocChecking(ASTContext &Ctx, TypeLoc &T,
599599
Optional<DiagnosticSuppression> suppression;
600600
if (!ProduceDiagnostics)
601601
suppression.emplace(Ctx.Diags);
602-
TypeChecker &TC = createTypeChecker(Ctx);
602+
assert(Ctx.getLegacyGlobalTypeChecker() &&
603+
"Should have a TypeChecker registered");
603604
return TypeChecker::validateType(Ctx, T, resolution, options);
604605
}
605606

0 commit comments

Comments
 (0)