mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
CheckErrorCoverage doesn't need a TypeChecker
This commit is contained in:
@@ -321,7 +321,7 @@ public:
|
||||
|
||||
if (NB != B) {
|
||||
FD->setBody(NB);
|
||||
TypeChecker::createForContext(Context).checkFunctionErrorHandling(FD);
|
||||
TypeChecker::checkFunctionErrorHandling(FD);
|
||||
}
|
||||
}
|
||||
} else if (auto *NTD = dyn_cast<NominalTypeDecl>(D)) {
|
||||
@@ -691,9 +691,8 @@ void swift::performPCMacro(SourceFile &SF, TopLevelContext &TLC) {
|
||||
BraceStmt *NewBody = I.transformBraceStmt(Body, true);
|
||||
if (NewBody != Body) {
|
||||
TLCD->setBody(NewBody);
|
||||
TypeChecker &TC = TypeChecker::createForContext(ctx);
|
||||
TC.checkTopLevelErrorHandling(TLCD);
|
||||
TC.contextualizeTopLevelCode(TLC, TLCD);
|
||||
TypeChecker::checkTopLevelErrorHandling(TLCD);
|
||||
TypeChecker::contextualizeTopLevelCode(TLC, TLCD);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user