]> Cypherpunks repositories - gostls13.git/commit
cmd/vet: remove copylock warning about result types and calls
authorIan Lance Taylor <iant@golang.org>
Fri, 1 Jul 2016 20:52:26 +0000 (13:52 -0700)
committerIan Lance Taylor <iant@golang.org>
Mon, 4 Jul 2016 03:23:23 +0000 (03:23 +0000)
commit003a68bc7fcb917b5a4d92a5c2244bb1adf8f690
tree204dd9956cb5394cf52a5f3bd0a97e1aa81738a4
parent878e002bb9021822cc44a9e20cf92689a2c478e7
cmd/vet: remove copylock warning about result types and calls

Don't issue a copylock warning about a result type; the function may
return a composite literal with a zero value, which is OK.

Don't issue a copylock warning about a function call on the RHS, or an
indirection of a function call; the function may return a composite
literal with a zero value, which is OK.

Updates #16227.

Change-Id: I94f0e066bbfbca5d4f8ba96106210083e36694a2
Reviewed-on: https://go-review.googlesource.com/24711
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
src/cmd/vet/copylock.go
src/cmd/vet/testdata/copylock_func.go