☰
Debian Codegraph
@
2026.2.1-1
2026.1-4
2026.1-3
/
/
staticcheck
/
sa4001
/
testdata
/
go1.0
/
CheckIneffectiveCopy
/
CheckIneffectiveCopy.go
☽
☼
staticcheck/sa4001/testdata/go1.0/CheckIneffectiveCopy/CheckIneffectiveCopy.go
code
plain
raw
Expat
2016-2017 Dominik Honnef
debian/copyright
1
package pkg
2
3
type T struct{}
4
5
func fn1(_ *T) {}
6
7
func fn2() {
8
t1 := &T{}
9
fn1(&*t1) //@ diag(`will not copy`)
10
fn1(*&t1) //@ diag(`will not copy`)
11
12
_Cvar_something := &T{}
13
fn1(&*_Cvar_something)
14
}