]> Cypherpunks repositories - gostls13.git/commitdiff
[release-branch.go1] go/ast: Walk: do not walk comment list
authorRobert Griesemer <gri@golang.org>
Fri, 21 Sep 2012 19:53:39 +0000 (05:53 +1000)
committerRobert Griesemer <gri@golang.org>
Fri, 21 Sep 2012 19:53:39 +0000 (05:53 +1000)
««« backport 5e3661048f2e
go/ast: Walk: do not walk comment list

A comment to that effect was introduced
with rev d332f4b9cef5 but the respective
code wasn't deleted.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/6304086

»»»

src/pkg/go/ast/walk.go

index 181cfd1491adf416894a7c806e9800fb057dd320..66b1dc2499b986d54684428e47db256a00288ac9 100644 (file)
@@ -344,9 +344,6 @@ func Walk(v Visitor, node Node) {
                }
                Walk(v, n.Name)
                walkDeclList(v, n.Decls)
-               for _, g := range n.Comments {
-                       Walk(v, g)
-               }
                // don't walk n.Comments - they have been
                // visited already through the individual
                // nodes