]> Cypherpunks repositories - gostls13.git/commit
cmd/cover: retain un-attached compiler directives
authorDhananjay Nakrani <dhananjaynakrani@gmail.com>
Mon, 19 Dec 2016 03:25:37 +0000 (19:25 -0800)
committerRob Pike <r@golang.org>
Tue, 20 Dec 2016 01:31:42 +0000 (01:31 +0000)
commit7eee5127735ab9b3cd1f231c5f0dcf7d1e5dd9fd
tree11d1b29e16f7541cf17f064cbfbc7960354bd906
parenta0667be8ef56c405d093cc0f5817b9932b4ca76c
cmd/cover: retain un-attached compiler directives

Parser doesn't attach some compiler directives to anything in the tree.
We have to explicitely retain them in the generated code. This change,
makes cover explicitely print out any compiler directive that wasn't
handled in the ast.Visitor.

Fixes #18285.

Change-Id: Ib60f253815e92d7fc85051a7f663a61116e40a91
Reviewed-on: https://go-review.googlesource.com/34563
Run-TryBot: Rob Pike <r@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
src/cmd/cover/cover.go
src/cmd/cover/cover_test.go
src/cmd/cover/testdata/test.go