prysm-pulse/tools/analyzers/nop/testdata/no_op.go

15 lines
433 B
Go
Raw Normal View History

package testdata
type foo struct {
}
func AddressOfDereferencedValue() {
x := &foo{}
_ = &*x // want "Found a no-op instruction that can be safely removed. It might be a result of writing code that does not do what was intended."
}
func DereferencedAddressOfValue() {
x := foo{}
_ = *&x // want "Found a no-op instruction that can be safely removed. It might be a result of writing code that does not do what was intended."
}