• Russ Cox's avatar
    cmd/go: run cover before cgo · 5a7fd403
    Russ Cox authored
    If we're running coverage on a package using cgo, we need to
    apply both cmd/cover and cmd/cgo as source transformers.
    To date we've applied cgo, then cover.
    
    Cover is very sensitive to the exact character position of
    expressions in its input, though, and cgo is not, so swap
    them, applying first cover and then cgo.
    
    The only drawback here is that coverage formerly applied
    to SWIG-generated cgo files, and now it does not.
    I am not convinced anyone depended critically on that,
    and probably the later analysis with go tool cover would
    have tried to parse the original .swig file as a Go file and
    gotten very confused.
    
    Fixes #8726.
    Fixes #9212.
    Fixes #9479.
    
    Change-Id: I777c8b64f7726cb117d59e03073954abc6dfa34d
    Reviewed-on: https://go-review.googlesource.com/77155Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    5a7fd403
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...