diff options
| author | Austin Clements <austin@google.com> | 2020-04-30 01:40:37 +0000 |
|---|---|---|
| committer | Bryan C. Mills <bcmills@google.com> | 2020-04-30 02:29:55 +0000 |
| commit | eda6fe3572b2fb02c2a8c87892744d04fea87691 (patch) | |
| tree | 1d5b4dbcd897708364d7b31dceafdec5a87f7ceb /src | |
| parent | 4f7053c87f9ebf3acab7669d380f53bdfba0566b (diff) | |
| download | go-eda6fe3572b2fb02c2a8c87892744d04fea87691.tar.xz | |
Revert "cmd/compile: omit file:pos for non-existent, permission errors"
This reverts commit 4f7053c87f9ebf3acab7669d380f53bdfba0566b.
Reason for revert: Newly added test is failing on several builders.
Change-Id: I22dcbfebf2f57735b2f479886bbeb623f95b132f
Reviewed-on: https://go-review.googlesource.com/c/go/+/231043
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src')
| -rw-r--r-- | src/cmd/compile/internal/gc/subr.go | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/cmd/compile/internal/gc/subr.go b/src/cmd/compile/internal/gc/subr.go index 6df9ffc66e..2bbc5e4ae1 100644 --- a/src/cmd/compile/internal/gc/subr.go +++ b/src/cmd/compile/internal/gc/subr.go @@ -60,15 +60,9 @@ func adderrorname(n *Node) { } func adderr(pos src.XPos, format string, args ...interface{}) { - msg := fmt.Sprintf(format, args...) - // Only add the position if we have a file. - // See issue golang.org/issue/11361. - if !strings.HasSuffix(msg, ": no such file or directory") && !strings.HasSuffix(msg, ": permission denied") { - msg = fmt.Sprintf("%v: %s", linestr(pos), msg) - } errors = append(errors, Error{ pos: pos, - msg: msg + "\n", + msg: fmt.Sprintf("%v: %s\n", linestr(pos), fmt.Sprintf(format, args...)), }) } |
