Home | History | Annotate | Download | only in test

Lines Matching refs:to

15 func bar(a, b *string) U { // ERROR "leaking param: a to result ~r2 level=0$" "leaking param: b to result ~r2 level=0$"
19 func foo(x U) U { // ERROR "leaking param: x to result ~r1 level=0$"
23 func bff(a, b *string) U { // ERROR "leaking param: a to result ~r2 level=0$" "leaking param: b to result ~r2 level=0$"
29 b := "dog" // ERROR "moved to heap: b$"
32 return &b // ERROR "&b escapes to heap$"
35 // BAD: need fine-grained analysis to track u[0] and u[1] differently.
37 a := "cat" // ERROR "moved to heap: a$"
38 b := "dog" // ERROR "moved to heap: b$"
39 u := bff(&a, &b) // ERROR "&a escapes to heap$" "&b escapes to heap$"
44 func car(x U) *string { // ERROR "leaking param: x to result ~r1 level=0$"
48 // BAD: need fine-grained analysis to track x[0] and x[1] differently.
49 func fun(x U, y *string) *string { // ERROR "leaking param: x to result ~r2 level=0$" "leaking param: y to result ~r2 level=0$"
54 func fup(x *U, y *string) *string { // ERROR "leaking param: x to result ~r2 level=1$" "leaking param: y$"
55 x[0] = y // leaking y to heap is intended
59 func fum(x *U, y **string) *string { // ERROR "leaking param: x to result ~r2 level=1$" "leaking param content: y$"
64 func fuo(x *U, y *U) *string { // ERROR "leaking param: x to result ~r2 level=1$" "leaking param content: y$"
78 b := [4000000]*string{*x} // ERROR "moved to heap: b"
86 b := [4000000]*string{x} // ERROR "moved to heap: b"
94 b := new([65537]*string) // ERROR "new\(\[65537\]\*string\) escapes to heap"
112 b := new(a65537) // ERROR "new\(a65537\) escapes to heap"
120 b := make([]*string, 65537) // ERROR "make\(\[\]\*string, 65537\) escapes to heap"