The lines on nodes within the IF-tree generated for switch
statements looks like control flow so the lines get marked
as statement boundaries. Except for the first/root comparison,
explicitly disable the marks.
Change-Id: I64b966ed8e427cdc6b816ff6b6a2eb754346edc7
Reviewed-on: https://go-review.googlesource.com/c/go/+/198738
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
for i := lo; i < hi; i++ {
nif := nod(OIF, nil, nil)
base(i, nif)
+ lineno = lineno.WithNotStmt()
nif.Left = typecheck(nif.Left, ctxExpr)
nif.Left = defaultlit(nif.Left, nil)
out.Append(nif)
half := lo + n/2
nif := nod(OIF, nil, nil)
nif.Left = less(half)
+ lineno = lineno.WithNotStmt()
nif.Left = typecheck(nif.Left, ctxExpr)
nif.Left = defaultlit(nif.Left, nil)
do(lo, half, &nif.Nbody)