• 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
..
5a Loading commit data...
5c Loading commit data...
5g Loading commit data...
5l Loading commit data...
6a Loading commit data...
6c Loading commit data...
6g Loading commit data...
6l Loading commit data...
8a Loading commit data...
8c Loading commit data...
8g Loading commit data...
8l Loading commit data...
addr2line Loading commit data...
api Loading commit data...
cc Loading commit data...
cgo Loading commit data...
cov Loading commit data...
dist Loading commit data...
fix Loading commit data...
gc Loading commit data...
go Loading commit data...
godoc Loading commit data...
gofmt Loading commit data...
ld Loading commit data...
nm Loading commit data...
objdump Loading commit data...
pack Loading commit data...
prof Loading commit data...
vet Loading commit data...
yacc Loading commit data...