Home | History | Annotate | Download | only in test

Lines Matching refs:to

25 func (u U) SP() *string { // ERROR "leaking param: u to result ~r0 level=0$"
29 func (u U) SPP() **string { // ERROR "leaking param: u to result ~r0 level=0$"
33 func (u U) SPPi() *string { // ERROR "leaking param: u to result ~r0 level=1$"
38 s := "cat" // ERROR "moved to heap: s$"
39 ps := &s // ERROR "&s escapes to heap$"
46 s := "cat" // ERROR "moved to heap: s$"
47 ps := &s // ERROR "&s escapes to heap$"
53 // BAD: need fine-grained analysis to avoid spurious escape of ps
55 s := "cat" // ERROR "moved to heap: s$"
56 ps := &s // ERROR "&s escapes to heap$" "moved to heap: ps$"
57 pps := &ps // ERROR "&ps escapes to heap$"
62 func (v V) u() U { // ERROR "leaking param: v to result ~r0 level=0$"
66 func (v V) UP() *U { // ERROR "leaking param: v to result ~r0 level=0$"
70 func (v V) UPP() **U { // ERROR "leaking param: v to result ~r0 level=0$"
74 func (v V) UPPia() *U { // ERROR "leaking param: v to result ~r0 level=1$"
78 func (v V) UPPib() *U { // ERROR "leaking param: v to result ~r0 level=1$"
82 func (v V) USPa() *string { // ERROR "leaking param: v to result ~r0 level=0$"
86 func (v V) USPb() *string { // ERROR "leaking param: v to result ~r0 level=0$"
90 func (v V) USPPia() *string { // ERROR "leaking param: v to result ~r0 level=1$"
94 func (v V) USPPib() *string { // ERROR "leaking param: v to result ~r0 level=1$"
98 func (v V) UPiSPa() *string { // ERROR "leaking param: v to result ~r0 level=1$"
102 func (v V) UPiSPb() *string { // ERROR "leaking param: v to result ~r0 level=1$"
106 func (v V) UPiSPc() *string { // ERROR "leaking param: v to result ~r0 level=1$"
110 func (v V) UPiSPd() *string { // ERROR "leaking param: v to result ~r0 level=1$"
114 // BAD: need fine-grained (field-sensitive) analysis to avoid spurious escape of all but &s3
117 s2 := "bat" // ERROR "moved to heap: s2$"
118 s3 := "cat" // ERROR "moved to heap: s3$"
119 s4 := "dog" // ERROR "moved to heap: s4$"
120 s5 := "emu" // ERROR "moved to heap: s5$"
121 s6 := "fox" // ERROR "moved to heap: s6$"
122 ps2 := &s2 // ERROR "&s2 escapes to heap$"
123 ps4 := &s4 // ERROR "&s4 escapes to heap$" "moved to heap: ps4$"
124 ps6 := &s6 // ERROR "&s6 escapes to heap$" "moved to heap: ps6$"
126 u2 := &U{&s3, &ps4} // ERROR "&ps4 escapes to heap$" "&s3 escapes to heap$" "tUPiSPa &U literal does not escape$"
127 u3 := &U{&s5, &ps6} // ERROR "&U literal escapes to heap$" "&ps6 escapes to heap$" "&s5 escapes to heap$"
132 // BAD: need fine-grained (field-sensitive) analysis to avoid spurious escape of all but &s3
135 s2 := "bat" // ERROR "moved to heap: s2$"
136 s3 := "cat" // ERROR "moved to heap: s3$"
137 s4 := "dog" // ERROR "moved to heap: s4$"
138 s5 := "emu" // ERROR "moved to heap: s5$"
139 s6 := "fox" // ERROR "moved to heap: s6$"
140 ps2 := &s2 // ERROR "&s2 escapes to heap$"
141 ps4 := &s4 // ERROR "&s4 escapes to heap$" "moved to heap: ps4$"
142 ps6 := &s6 // ERROR "&s6 escapes to heap$" "moved to heap: ps6$"
144 u2 := &U{&s3, &ps4} // ERROR "&ps4 escapes to heap$" "&s3 escapes to heap$" "tUPiSPb &U literal does not escape$"
145 u3 := &U{&s5, &ps6} // ERROR "&U literal escapes to heap$" "&ps6 escapes to heap$" "&s5 escapes to heap$"
150 // BAD: need fine-grained (field-sensitive) analysis to avoid spurious escape of all but &s3
153 s2 := "bat" // ERROR "moved to heap: s2$"
154 s3 := "cat" // ERROR "moved to heap: s3$"
155 s4 := "dog" // ERROR "moved to heap: s4$"
156 s5 := "emu" // ERROR "moved to heap: s5$"
157 s6 := "fox" // ERROR "moved to heap: s6$"
158 ps2 := &s2 // ERROR "&s2 escapes to heap$"
159 ps4 := &s4 // ERROR "&s4 escapes to heap$" "moved to heap: ps4$"
160 ps6 := &s6 // ERROR "&s6 escapes to heap$" "moved to heap: ps6$"
162 u2 := &U{&s3, &ps4} // ERROR "&ps4 escapes to heap$" "&s3 escapes to heap$" "tUPiSPc &U literal does not escape$"
163 u3 := &U{&s5, &ps6} // ERROR "&U literal escapes to heap$" "&ps6 escapes to heap$" "&s5 escapes to heap$"
168 // BAD: need fine-grained (field-sensitive) analysis to avoid spurious escape of all but &s3
171 s2 := "bat" // ERROR "moved to heap: s2$"
172 s3 := "cat" // ERROR "moved to heap: s3$"
173 s4 := "dog" // ERROR "moved to heap: s4$"
174 s5 := "emu" // ERROR "moved to heap: s5$"
175 s6 := "fox" // ERROR "moved to heap: s6$"
176 ps2 := &s2 // ERROR "&s2 escapes to heap$"
177 ps4 := &s4 // ERROR "&s4 escapes to heap$" "moved to heap: ps4$"
178 ps6 := &s6 // ERROR "&s6 escapes to heap$" "moved to heap: ps6$"
180 u2 := &U{&s3, &ps4} // ERROR "&ps4 escapes to heap$" "&s3 escapes to heap$" "tUPiSPd &U literal does not escape$"
181 u3 := &U{&s5, &ps6} // ERROR "&U literal escapes to heap$" "&ps6 escapes to heap$" "&s5 escapes to heap$"
186 func (v V) UPiSPPia() *string { // ERROR "leaking param: v to result ~r0 level=2$"
190 func (v V) UPiSPPib() *string { // ERROR "leaking param: v to result ~r0 level=2$"
194 func (v V) UPiSPPic() *string { // ERROR "leaking param: v to result ~r0 level=2$"
198 func (v V) UPiSPPid() *string { // ERROR "leaking param: v to result ~r0 level=2$"
202 // BAD: need fine-grained (field-sensitive) analysis to avoid spurious escape of all but &s4
207 s4 := "dog" // ERROR "moved to heap: s4$"
208 s5 := "emu" // ERROR "moved to heap: s5$"
209 s6 := "fox" // ERROR "moved to heap: s6$"
211 ps4 := &s4 // ERROR "&s4 escapes to heap$"
212 ps6 := &s6 // ERROR "&s6 escapes to heap$" "moved to heap: ps6$"
215 u3 := &U{&s5, &ps6} // ERROR "&ps6 escapes to heap$" "&s5 escapes to heap$" "tUPiSPPia &U literal does not escape$"
220 // BAD: need fine-grained (field-sensitive) analysis to avoid spurious escape of all but &s4
225 s4 := "dog" // ERROR "moved to heap: s4$"
226 s5 := "emu" // ERROR "moved to heap: s5$"
227 s6 := "fox" // ERROR "moved to heap: s6$"
229 ps4 := &s4 // ERROR "&s4 escapes to heap$"
230 ps6 := &s6 // ERROR "&s6 escapes to heap$" "moved to heap: ps6$"
233 u3 := &U{&s5, &ps6} // ERROR "&ps6 escapes to heap$" "&s5 escapes to heap$" "tUPiSPPib &U literal does not escape$"
238 // BAD: need fine-grained (field-sensitive) analysis to avoid spurious escape of all but &s4
243 s4 := "dog" // ERROR "moved to heap: s4$"
244 s5 := "emu" // ERROR "moved to heap: s5$"
245 s6 := "fox" // ERROR "moved to heap: s6$"
247 ps4 := &s4 // ERROR "&s4 escapes to heap$"
248 ps6 := &s6 // ERROR "&s6 escapes to heap$" "moved to heap: ps6$"
251 u3 := &U{&s5, &ps6} // ERROR "&ps6 escapes to heap$" "&s5 escapes to heap$" "tUPiSPPic &U literal does not escape$"
256 // BAD: need fine-grained (field-sensitive) analysis to avoid spurious escape of all but &s4
261 s4 := "dog" // ERROR "moved to heap: s4$"
262 s5 := "emu" // ERROR "moved to heap: s5$"
263 s6 := "fox" // ERROR "moved to heap: s6$"
265 ps4 := &s4 // ERROR "&s4 escapes to heap$"
266 ps6 := &s6 // ERROR "&s6 escapes to heap$" "moved to heap: ps6$"
269 u3 := &U{&s5, &ps6} // ERROR "&ps6 escapes to heap$" "&s5 escapes to heap$" "tUPiSPPid &U literal does not escape$"
274 func (v V) UPPiSPPia() *string { // ERROR "leaking param: v to result ~r0 level=3$"
278 // This test isolates the one value that needs to escape, not because
282 // being able to encode that fact.
283 func tUPPiSPPia() { // This test is sensitive to the level cap in function summary results.
289 s6 := "fox" // ERROR "moved to heap: s6$"
292 ps6 := &s6 // ERROR "&s6 escapes to heap$"