aboutsummaryrefslogtreecommitdiff
path: root/test/escape_calls.go
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2021-05-26 13:54:31 -0700
committerMatthew Dempsky <mdempsky@google.com>2021-05-26 23:50:32 +0000
commite99e9a6e0147592b12175a19a2a9dafe96a984f9 (patch)
tree0f46c545036f9ec5ccff9d38a8272c2e440b9cb4 /test/escape_calls.go
parent4c68edd1feaad43e098dd7375d6c1cfc43243211 (diff)
downloadgo-e99e9a6e0147592b12175a19a2a9dafe96a984f9.tar.gz
go-e99e9a6e0147592b12175a19a2a9dafe96a984f9.zip
[dev.typeparams] cmd/compile: simplify ~r/~b naming
The compiler renames anonymous and blank result parameters to ~rN or ~bN, but the current semantics for computing N are rather annoying and difficult to reproduce cleanly. They also lead to difficult to read escape analysis results in tests. This CL changes N to always be calculated as the parameter's index within the function's result parameter tuple. E.g., if a function has a single result, it will now always be named "~r0". The normative change to this CL is fairly simple, but it requires updating a lot of test expectations. Change-Id: I58a3c94de00cb822cb94efe52d115531193c993c Reviewed-on: https://go-review.googlesource.com/c/go/+/323010 Trust: Matthew Dempsky <mdempsky@google.com> Trust: Dan Scales <danscales@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Dan Scales <danscales@google.com>
Diffstat (limited to 'test/escape_calls.go')
-rw-r--r--test/escape_calls.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/escape_calls.go b/test/escape_calls.go
index 9e1db5426e..aa7c7f516c 100644
--- a/test/escape_calls.go
+++ b/test/escape_calls.go
@@ -11,7 +11,7 @@
package foo
-func f(buf []byte) []byte { // ERROR "leaking param: buf to result ~r1 level=0$"
+func f(buf []byte) []byte { // ERROR "leaking param: buf to result ~r0 level=0$"
return buf
}