1
0
mirror of https://github.com/golang/go synced 2024-11-18 19:04:40 -07:00

go/ssa: remove statement with no effect

Change-Id: I1c7958ab16f19fbdc71d2305da3d4afb6e150f73
Reviewed-on: https://go-review.googlesource.com/45934
Reviewed-by: Dmitri Shuralyov <shurcool@gmail.com>
This commit is contained in:
Alan Donovan 2017-06-15 17:24:39 -04:00
parent 6d30ceaab7
commit 34f7837286

View File

@ -352,7 +352,6 @@ func (s *sanity) checkBlock(b *BasicBlock, index int) {
// TODO(adonovan): also check their block dominates block b.
if val, ok := val.(Instruction); ok {
if val.Block() == nil {
val.String()
s.errorf("operand %d of %s is an instruction (%s) that belongs to no block", i, instr, val)
} else if val.Parent() != s.fn {
s.errorf("operand %d of %s is an instruction (%s) from function %s", i, instr, val, val.Parent())