go/src
Matthew Dempsky 7fa195c1b9 cmd/compile: fix false positives in isGoConst
isGoConst could spuriously return true for variables that shadow a
constant declaration with the same name.

Because even named constants are always represented by OLITERAL nodes,
the easy fix is to just ignore ONAME nodes in isGoConst. We can
similarly ignore ONONAME nodes.

Confirmed that k8s.io/kubernetes/test/e2e/storage builds again with
this fix.

Fixes #30430.

Change-Id: I899400d749982d341dc248a7cd5a18277c2795ec
Reviewed-on: https://go-review.googlesource.com/c/164319
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
2019-02-28 20:31:53 +00:00
..
archive archive/tar, syscall: add statUnix for aix/ppc64 2019-02-27 23:40:20 +00:00
bufio bufio: document relationship between UnreadByte/UnreadRune and Peek 2019-01-08 23:47:27 +00:00
builtin
bytes bytes: clean up a test 2019-02-26 23:16:46 +00:00
cmd cmd/compile: fix false positives in isGoConst 2019-02-28 20:31:53 +00:00
compress compress/gzip: clarify that Multistream gzip requires a ByteReader 2019-02-26 23:02:40 +00:00
container container/heap: avoid memory leak in example 2019-02-26 23:42:26 +00:00
context
crypto internal/cpu: change s390x API to match x/sys/cpu 2019-02-28 13:46:45 +00:00
database/sql database/sql/driver: fix typo 2019-02-15 17:23:55 +00:00
debug debug/pe: prevent slice out of bounds access in (*File).ImportedSymbols 2019-02-27 08:10:14 +00:00
encoding encoding/json: remove use of DeepEqual for testing errors 2019-02-27 18:24:23 +00:00
errors errors: add Unwrap, Is, and As 2019-02-27 19:09:40 +00:00
expvar
flag flag: improve docs for PrintDefaults; clarify how to change output destination 2019-01-21 05:30:12 +00:00
fmt fmt: fix %d and other non-string verbs on errors 2019-02-28 17:31:37 +00:00
go internal/lazytemplate: add a lazy template wrapper 2019-02-27 23:49:01 +00:00
hash hash/fnv: use bits.Mul64 for 128-bit hash 2018-12-10 22:50:48 +00:00
html html/template: use strings.Builder 2019-02-26 20:12:09 +00:00
image image/png: delete unused statement 2019-02-28 18:24:51 +00:00
index/suffixarray
internal internal/cpu: change s390x API to match x/sys/cpu 2019-02-28 13:46:45 +00:00
io io: align style of test comments in multi_test.go 2019-02-26 23:01:20 +00:00
log log: add Logger.Writer method 2018-10-25 23:23:57 +00:00
math math/big: better initial guess for nat.sqrt 2019-02-27 18:48:56 +00:00
mime mime/multipart: quote boundary in Content-Type if necessary 2018-12-13 23:58:06 +00:00
net net/http: remove use of DeepEqual for testing errors 2019-02-27 18:24:06 +00:00
os os: clarify that mode argument is only used if file is created 2019-02-26 23:28:32 +00:00
path path/filepath: revert "fix Windows-specific Clean bug" 2019-02-20 18:32:07 +00:00
plugin plugin: fix build constraint to disable test on linux/arm64 2018-11-28 18:14:20 +00:00
reflect reflect: eliminate write barrier for copying result in callReflect 2019-02-01 19:23:02 +00:00
regexp regexp: add ReplaceAllStringFunc example 2019-02-27 21:48:41 +00:00
runtime internal/reflectlite: lite version of reflect package 2019-02-27 18:27:01 +00:00
sort sort: change let to let's 2019-01-27 01:34:56 +00:00
strconv strconv: remove use of DeepEqual for testing errors 2019-02-27 18:23:19 +00:00
strings strings: add ReplaceAll example 2018-12-13 00:35:06 +00:00
sync sync/atomic: add 32-bit MIPS to the 64-bit alignment requirement 2019-02-09 23:07:07 +00:00
syscall syscall: use 64-bit alignment on netbsd-arm 2019-02-28 11:24:52 +00:00
testdata
testing all: fix typos as reported by 'misspell' 2019-02-26 23:02:05 +00:00
text text/template: error on method calls on nil interfaces 2019-02-26 18:05:09 +00:00
time time: move the explanation of u/micro to the ParseDuration example 2019-02-28 00:24:56 +00:00
unicode unicode: improve generated comments for categories 2018-11-28 03:12:48 +00:00
unsafe cmd/compile: assume unsafe pointer arithmetic generates non-nil results 2018-11-14 21:01:36 +00:00
Make.dist
all.bash
all.bat
all.rc
androidtest.bash misc/android,cmd/dist: move $GOROOT copying to the exec wrapper 2019-02-26 18:00:48 +00:00
bootstrap.bash
buildall.bash
clean.bash
clean.bat
clean.rc
cmp.bash
iostest.bash cmd/dist: build exec wrappers during bootstrap 2019-02-26 17:59:23 +00:00
make.bash build: clear GO111MODULE during make.bash etc 2018-11-16 18:54:22 +00:00
make.bat build: clear GO111MODULE during make.bash etc 2018-11-16 18:54:22 +00:00
make.rc build: clear GO111MODULE during make.bash etc 2018-11-16 18:54:22 +00:00
naclmake.bash
nacltest.bash
race.bash cmd,runtime: enable race detector on arm64 2018-11-13 16:57:22 +00:00
race.bat
run.bash build: clear GO111MODULE during make.bash etc 2018-11-16 18:54:22 +00:00
run.bat build: clear GO111MODULE during make.bash etc 2018-11-16 18:54:22 +00:00
run.rc build: clear GO111MODULE during make.bash etc 2018-11-16 18:54:22 +00:00