Lines Matching refs:Bar
115 type Bar struct {
120 func NewBar() *Bar {
121 return &Bar{42, nil} // ERROR "&Bar literal escapes to heap$"
124 func NewBarp(x *int) *Bar { // ERROR "leaking param: x to result ~r1 level=-1$"
125 return &Bar{42, x} // ERROR "&Bar literal escapes to heap$"
128 func NewBarp2(x *int) *Bar { // ERROR "NewBarp2 x does not escape$"
129 return &Bar{*x, nil} // ERROR "&Bar literal escapes to heap$"
132 func (b *Bar) NoLeak() int { // ERROR "\(\*Bar\).NoLeak b does not escape$"
136 func (b *Bar) Leak() *int { // ERROR "leaking param: b to result ~r0 level=0$"
140 func (b *Bar) AlsoNoLeak() *int { // ERROR "leaking param: b to result ~r0 level=1$"
144 func (b Bar) AlsoLeak() *int { // ERROR "leaking param: b to result ~r0 level=0$"
148 func (b Bar) LeaksToo() *int { // ERROR "leaking param: b to result ~r0 level=0$"
154 func (b *Bar) LeaksABit() *int { // ERROR "leaking param: b to result ~r0 level=1$"
160 func (b Bar) StillNoLeak() int { // ERROR "Bar.StillNoLeak b does not escape$"
162 b.ii = &v // ERROR "Bar.StillNoLeak &v does not escape$"
166 func goLeak(b *Bar) { // ERROR "leaking param: b$"
904 m := Bar{ii: x}
909 m := &Bar{ii: x} // ERROR "foo114 &Bar literal does not escape$"
1610 func (b *Buffer) bar() { // ERROR "leaking param: b$"