1
0
mirror of https://github.com/golang/go synced 2024-11-17 13:44:43 -07:00

cmd/compile: use else if for mutually exclusive if statements

Change-Id: I43e5bb778fbba1398c8006b1644524a9885157db
GitHub-Last-Rev: fa76473ab8
GitHub-Pull-Request: golang/go#47155
Reviewed-on: https://go-review.googlesource.com/c/go/+/334169
Trust: Keith Randall <khr@golang.org>
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
hkhere 2021-10-20 17:26:41 +00:00 committed by Keith Randall
parent 016d5eea11
commit 73652af80d

View File

@ -360,8 +360,7 @@ func funcargs(nt *ir.FuncType) {
if n.Sym == nil {
// Name so that escape analysis can track it. ~r stands for 'result'.
n.Sym = LookupNum("~r", i)
}
if n.Sym.IsBlank() {
} else if n.Sym.IsBlank() {
// Give it a name so we can assign to it during return. ~b stands for 'blank'.
// The name must be different from ~r above because if you have
// func f() (_ int)