• Russ Cox's avatar
    cmd/cgo: fix line number annotations in generated C code · f20e3a10
    Russ Cox authored
    The old version was using go/ast's CommentGroup.Text method,
    but that method drops leading blank lines from the result, so that
    if the comment looked like one of
    
    //
    // syntax error
    import "C"
    
    /*
    syntax error
    */
    import "C"
    
    then the line numbers for the syntax error would be off by the
    number of leading blank lines (1 in each of the above cases).
    
    The new text extractor preserves blank lines.
    
    Fixes #4019.
    
    R=golang-dev, iant
    CC=golang-dev
    https://golang.org/cl/7232071
    f20e3a10
Name
Last commit
Last update
..
cmd Loading commit data...
lib9 Loading commit data...
libbio Loading commit data...
libmach Loading commit data...
pkg Loading commit data...
Make.dist Loading commit data...
all.bash Loading commit data...
all.bat Loading commit data...
all.rc Loading commit data...
clean.bash Loading commit data...
clean.bat Loading commit data...
clean.rc Loading commit data...
make.bash Loading commit data...
make.bat Loading commit data...
make.rc Loading commit data...
race.bash Loading commit data...
run.bash Loading commit data...
run.bat Loading commit data...
run.rc Loading commit data...
sudo.bash Loading commit data...