]> Cypherpunks repositories - gostls13.git/commit
cmd/vet: allow ^& uintptr arithmetic
authorJosh Bleecher Snyder <josharian@gmail.com>
Tue, 19 Jul 2016 00:33:05 +0000 (17:33 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Wed, 17 Aug 2016 20:48:57 +0000 (20:48 +0000)
commit752e16158751165c53538a564ca0a8bd7ba84f1f
tree834789c4860c60d88665f7e59a91105164b32cc1
parentebcd17979326b44f445cdfe7640dc53cf14c19ca
cmd/vet: allow ^& uintptr arithmetic

The unsafe.Pointer check allows adding to
and subtracting from uintptrs in order to do
arithmetic.

Some code needs to round uintptrs.
Allow &^ for that purpose.

Updates #11041

Change-Id: Ib90dd2954bb6c78427058271e13f2ce4c4af38fb
Reviewed-on: https://go-review.googlesource.com/27156
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
src/cmd/vet/testdata/unsafeptr.go
src/cmd/vet/unsafeptr.go