• Ian Lance Taylor's avatar
    go/scanner: continue adding directory to file name · d6597ade
    Ian Lance Taylor authored
    Before CL 97795, when go/scanner saw a //line comment, it would clean
    the path and, if the path was relative, prepend the directory from the
    file name. This was not the best API because it meant that the
    behavior changed based on whether the code was running on Windows or
    not, and it meant that information from the //line directive was lost.
    So in CL 97795, among other changes, go/scanner was changed to simply
    return the filename given in the //line comment.
    
    Unfortunately existing tools such as unparam and unconvert expected
    the old behavior. In order to avoid breaking those tools, revert that
    part of the change.
    
    Fixes #26671
    
    Change-Id: Ifa06542bd19cda9d682ac33766ab9080444ba050
    Reviewed-on: https://go-review.googlesource.com/127658
    Run-TryBot: Ian Lance Taylor <iant@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    d6597ade
Name
Last commit
Last update
..
ast Loading commit data...
build Loading commit data...
constant Loading commit data...
doc Loading commit data...
format Loading commit data...
importer Loading commit data...
internal Loading commit data...
parser Loading commit data...
printer Loading commit data...
scanner Loading commit data...
token Loading commit data...
types Loading commit data...