]> Cypherpunks repositories - gostls13.git/commit
cmd/cover: don't try to attach directives to synthetic decls
authorJay Conrod <jayconrod@google.com>
Tue, 17 Oct 2017 19:33:45 +0000 (15:33 -0400)
committerRobert Griesemer <gri@golang.org>
Tue, 17 Oct 2017 22:14:28 +0000 (22:14 +0000)
commit94e3a304524b6090686ace233a8bba97aa4f306a
tree0688b9c4d2abc526cf114ca08d6ccaf86f5e46a6
parent5f740d6875ab6961381f2f4614b21ff6ddf448a4
cmd/cover: don't try to attach directives to synthetic decls

Fixed an error that occurred in atomic mode. cover adds a global
variable declaration that forces sync/atomic to be used. fixDirectives
was confused by this declaration since it has an invalid
position. These declarations are now skipped.

Fixes #22309

Change-Id: I84f5fec13ef847fca35ad49f7704fb93b60503e0
Reviewed-on: https://go-review.googlesource.com/71351
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/cmd/cover/cover.go
src/cmd/cover/cover_test.go