]> Cypherpunks repositories - gostls13.git/commit
cmd/vet: skip unreachable "if" and "case" code in shift check.
authorAliaksandr Valialkin <valyala@gmail.com>
Mon, 13 Mar 2017 17:17:41 +0000 (19:17 +0200)
committerRob Pike <r@golang.org>
Wed, 19 Apr 2017 20:03:37 +0000 (20:03 +0000)
commit78510bd17c35932cd45f1433adb21aeaa0587767
tree7d05d472328cf265f671c036faa3d40c058840ad
parent6b0bd51c1c7f34acdc5556d88a52d9a9f3b14da5
cmd/vet: skip unreachable "if" and "case" code in shift check.

Such dead code is legitimate when dealing with arch-specific
types (int, uint, uintptr).

The CL removes the majority of 'too small for shift' false positives
from such a code.

Change-Id: I62c5635a1d3774ab2d71d3d7056f0589f214cbe5
Reviewed-on: https://go-review.googlesource.com/38065
Run-TryBot: Rob Pike <r@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
src/cmd/vet/all/whitelist/32bit.txt [deleted file]
src/cmd/vet/dead.go [new file with mode: 0644]
src/cmd/vet/main.go
src/cmd/vet/shift.go
src/cmd/vet/testdata/shift.go
src/sync/atomic/atomic_test.go