Commit bcf3e063 authored by Iskander Sharipov's avatar Iskander Sharipov

test: remove go:noinline from escape_because.go

File is compiled with "-l" flag, so go:noinline is redundant.

Change-Id: Ia269f3b9de9466857fc578ba5164613393e82369
Reviewed-on: https://go-review.googlesource.com/133295Reviewed-by: 's avatarCherry Zhang <cherryyz@google.com>
parent b88e4ad6
......@@ -113,8 +113,7 @@ func f13() {
escape(c)
}
//go:noinline
func transmit(b []byte) []byte { // ERROR "from ~r1 \(return\) at escape_because.go:118$" "leaking param: b to result ~r1 level=0$"
func transmit(b []byte) []byte { // ERROR "from ~r1 \(return\) at escape_because.go:117$" "leaking param: b to result ~r1 level=0$"
return b
}
......@@ -125,7 +124,7 @@ func f14() {
_, _ = s1, s2
}
func leakParams(p1, p2 *int) (*int, *int) { // ERROR "leaking param: p1 to result ~r2 level=0$" "from ~r2 \(return\) at escape_because.go:129$" "leaking param: p2 to result ~r3 level=0$" "from ~r3 \(return\) at escape_because.go:129$"
func leakParams(p1, p2 *int) (*int, *int) { // ERROR "leaking param: p1 to result ~r2 level=0$" "from ~r2 \(return\) at escape_because.go:128$" "leaking param: p2 to result ~r3 level=0$" "from ~r3 \(return\) at escape_because.go:128$"
return p1, p2
}
......@@ -133,14 +132,14 @@ func leakThroughOAS2() {
// See #26987.
i := 0 // ERROR "moved to heap: i$"
j := 0 // ERROR "moved to heap: j$"
sink, sink = &i, &j // ERROR "&i escapes to heap$" "from sink \(assign-pair\) at escape_because.go:136$" "from &i \(interface-converted\) at escape_because.go:136$" "&j escapes to heap$" "from &j \(interface-converted\) at escape_because.go:136"
sink, sink = &i, &j // ERROR "&i escapes to heap$" "from sink \(assign-pair\) at escape_because.go:135$" "from &i \(interface-converted\) at escape_because.go:135$" "&j escapes to heap$" "from &j \(interface-converted\) at escape_because.go:135"
}
func leakThroughOAS2FUNC() {
// See #26987.
i := 0 // ERROR "moved to heap: i$"
j := 0
sink, _ = leakParams(&i, &j) // ERROR "&i escapes to heap$" "&j does not escape$" "from .out0 \(passed-to-and-returned-from-call\) at escape_because.go:143$" "from sink \(assign-pair-func-call\) at escape_because.go:143$"
sink, _ = leakParams(&i, &j) // ERROR "&i escapes to heap$" "&j does not escape$" "from .out0 \(passed-to-and-returned-from-call\) at escape_because.go:142$" "from sink \(assign-pair-func-call\) at escape_because.go:142$"
}
// The list below is all of the why-escapes messages seen building the escape analysis tests.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment