diff options
author | Matthew Dempsky <mdempsky@google.com> | 2019-08-30 10:56:30 -0700 |
---|---|---|
committer | Matthew Dempsky <mdempsky@google.com> | 2019-09-03 17:52:06 +0000 |
commit | 9f89edcd9668bb3b011961fbcdd8fc2796acba5d (patch) | |
tree | fac2ea3d67038eff5b913af5cb6b24224c94767f /test/escape_indir.go | |
parent | a71967e4c5aa34f274b8b9aff915f14ac00e7ee8 (diff) | |
download | go-9f89edcd9668bb3b011961fbcdd8fc2796acba5d.tar.gz go-9f89edcd9668bb3b011961fbcdd8fc2796acba5d.zip |
cmd/compile: silence esc diagnostics about directiface OCONVIFACEs
In general, a conversion to interface type may require values to be
boxed, which in turn necessitates escape analysis to determine whether
the boxed representation can be stack allocated.
However, esc.go used to unconditionally print escape analysis
decisions about OCONVIFACE, even for conversions that don't require
boxing (e.g., pointers, channels, maps, functions).
For test compatibility with esc.go, escape.go similarly printed these
useless diagnostics. This CL removes the diagnostics, and updates test
expectations accordingly.
Change-Id: I97c57a4a08e44d265bba516c78426ff4f2bf1e12
Reviewed-on: https://go-review.googlesource.com/c/go/+/192697
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'test/escape_indir.go')
-rw-r--r-- | test/escape_indir.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/escape_indir.go b/test/escape_indir.go index ce21ea821f..ccc8418d55 100644 --- a/test/escape_indir.go +++ b/test/escape_indir.go @@ -54,7 +54,7 @@ func constptr1() { i := 0 // ERROR "moved to heap: i" x := &ConstPtr{} // ERROR "&ConstPtr literal escapes to heap" x.p = &i - sink = x // ERROR "x escapes to heap" + sink = x } func constptr2() { @@ -144,7 +144,7 @@ func foo2() { f **int } x := new(int) // ERROR "moved to heap: x" "new\(int\) escapes to heap" - sink = &x // ERROR "&x escapes to heap" + sink = &x var z Z z.f = &x p := z.f |