Commit 1de2344a authored by Keith Randall's avatar Keith Randall
Browse files

cmd/compile: drop column info when line number saturates

When line number saturates, we can end up getting non-monotonic
position info, because the start of the next line after line=lineMax,col=2
is line=lineMax,col=1.

Instead, if line==lineMax, make the column always 0 (no column info).
If the line number is wrong, having column info probably isn't that helpful.

Fixes #51193

Change-Id: If3d90472691b1f6163654f3505e2cb98467f2383
Reviewed-on: https://go-review.googlesource.com/c/go/+/385795


Trust: Keith Randall <khr@golang.org>
Reviewed-by: default avatarThan McIntosh <thanm@google.com>
parent 1ed30ca5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment