Skip to content

Commit c42cf3d

Browse files
committed
Make typeCheckAbstractFunctionBodyUntil a utility
1 parent e15eb47 commit c42cf3d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/Sema/TypeChecker.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -718,8 +718,8 @@ bool swift::typeCheckAbstractFunctionBodyUntil(AbstractFunctionDecl *AFD,
718718
auto &Ctx = AFD->getASTContext();
719719
DiagnosticSuppression suppression(Ctx.Diags);
720720

721-
TypeChecker &TC = createTypeChecker(Ctx);
722-
return !TC.typeCheckAbstractFunctionBodyUntil(AFD, EndTypeCheckLoc);
721+
(void)createTypeChecker(Ctx);
722+
return !TypeChecker::typeCheckAbstractFunctionBodyUntil(AFD, EndTypeCheckLoc);
723723
}
724724

725725
bool swift::typeCheckTopLevelCodeDecl(TopLevelCodeDecl *TLCD) {

lib/Sema/TypeChecker.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -981,8 +981,8 @@ class TypeChecker final {
981981
/// of the function, set the result type of the expression to that sugar type.
982982
static Expr *substituteInputSugarTypeForResult(ApplyExpr *E);
983983

984-
bool typeCheckAbstractFunctionBodyUntil(AbstractFunctionDecl *AFD,
985-
SourceLoc EndTypeCheckLoc);
984+
static bool typeCheckAbstractFunctionBodyUntil(AbstractFunctionDecl *AFD,
985+
SourceLoc EndTypeCheckLoc);
986986
static bool typeCheckAbstractFunctionBody(AbstractFunctionDecl *AFD);
987987

988988
static BraceStmt *applyFunctionBuilderBodyTransform(FuncDecl *FD,
@@ -1791,7 +1791,7 @@ class TypeChecker final {
17911791
///
17921792
/// An ignored expression is one that is not nested within a larger
17931793
/// expression or statement.
1794-
void checkIgnoredExpr(Expr *E);
1794+
static void checkIgnoredExpr(Expr *E);
17951795

17961796
// Emits a diagnostic, if necessary, for a reference to a declaration
17971797
// that is potentially unavailable at the given source location.

0 commit comments

Comments
 (0)