Commit dec5d99b authored by LE Manh Cuong's avatar LE Manh Cuong Committed by Matthew Dempsky

cmd/compile: remove outdate comment of treecopy

Since golang.org/cl/32487, treecopy does not handle non-iota ONONAME and
iota ONONAME anymore.

Change-Id: Icd5a81333a0d4d04adef2dbc58db92ce67aa0860
Reviewed-on: https://go-review.googlesource.com/c/go/+/172038Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
parent ad832284
...@@ -435,10 +435,9 @@ func nodstr(s string) *Node { ...@@ -435,10 +435,9 @@ func nodstr(s string) *Node {
} }
// treecopy recursively copies n, with the exception of // treecopy recursively copies n, with the exception of
// ONAME, OLITERAL, OTYPE, and non-iota ONONAME leaves. // ONAME, OLITERAL, OTYPE, and ONONAME leaves.
// Copies of iota ONONAME nodes are assigned the current // If pos.IsKnown(), it sets the source position of newly
// value of iota_. If pos.IsKnown(), it sets the source // allocated nodes to pos.
// position of newly allocated nodes to pos.
func treecopy(n *Node, pos src.XPos) *Node { func treecopy(n *Node, pos src.XPos) *Node {
if n == nil { if n == nil {
return nil return nil
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment