mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: fix CTNIL static data comments
Change-Id: I434f881c10dec41a802641db8873abf1353beba2 Reviewed-on: https://go-review.googlesource.com/20671 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
a0232ea0dd
commit
57faad6677
2 changed files with 1 additions and 1 deletions
|
|
@ -328,7 +328,6 @@ func gdata(nam *Node, nr *Node, wid int) {
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
// CTNILs don't reach gdata; search for CTNIL in sinit.go. Probably they should, eventually.
|
|
||||||
Fatalf("gdata unhandled OLITERAL %v", nr)
|
Fatalf("gdata unhandled OLITERAL %v", nr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -514,6 +514,7 @@ func staticname(t *Type, ctxt int) *Node {
|
||||||
}
|
}
|
||||||
|
|
||||||
func isliteral(n *Node) bool {
|
func isliteral(n *Node) bool {
|
||||||
|
// Treat nils as zeros rather than literals.
|
||||||
if n.Op == OLITERAL {
|
if n.Op == OLITERAL {
|
||||||
if n.Val().Ctype() != CTNIL {
|
if n.Val().Ctype() != CTNIL {
|
||||||
return true
|
return true
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue