From: Cuong Manh Le Date: Tue, 22 Mar 2022 13:57:19 +0000 (+0700) Subject: cmd/compile: remove typecheck.FuncBody X-Git-Tag: go1.19beta1~945 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=489e4882ef0df15f208e41915cedc1ceb2cc75fd;p=gostls13.git cmd/compile: remove typecheck.FuncBody CL 388535 removed the only usage of this function. Change-Id: Ie5a61cce75b03d83162f62989fe52388b069c9bc Reviewed-on: https://go-review.googlesource.com/c/go/+/394576 Trust: Cuong Manh Le Reviewed-by: Matthew Dempsky Run-TryBot: Cuong Manh Le TryBot-Result: Gopher Robot --- diff --git a/src/cmd/compile/internal/typecheck/typecheck.go b/src/cmd/compile/internal/typecheck/typecheck.go index 13c19dbdac..6dd3333eb0 100644 --- a/src/cmd/compile/internal/typecheck/typecheck.go +++ b/src/cmd/compile/internal/typecheck/typecheck.go @@ -45,17 +45,6 @@ func Callee(n ir.Node) ir.Node { return typecheck(n, ctxExpr|ctxCallee) } -func FuncBody(n *ir.Func) { - ir.CurFunc = n - errorsBefore := base.Errors() - Stmts(n.Body) - CheckUnused(n) - CheckReturn(n) - if ir.IsBlank(n.Nname) || base.Errors() > errorsBefore { - n.Body = nil // blank function or type errors; do not compile - } -} - var importlist []*ir.Func // AllImportedBodies reads in the bodies of all imported functions and typechecks