aboutsummaryrefslogtreecommitdiff
path: root/test/nilptr5.go
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2023-04-04 01:48:15 -0400
committerDan Willemsen <dwillemsen@google.com>2023-04-04 01:48:15 -0400
commitb8ef64ad4fdb1e85846486945f95766b6884e2dd (patch)
treef2420d57e0fe66287d5eeaedc6dfeee8b090f9d8 /test/nilptr5.go
parent83e7429b02e77e41a22987975042f0ddaebe99f9 (diff)
downloadlinux-x86-b8ef64ad4fdb1e85846486945f95766b6884e2dd.tar.gz
Update linux-x86 Go prebuilts from ab/9878432android-u-beta-1-gplllvm-r487747
https://ci.android.com/builds/branches/aosp-build-tools-release/grid?head=9878432&tail=9878432 Update script: toolchain/go/update-prebuilts.sh Test: Treehugger presubmit Change-Id: I07818c960e04b2ef4373ab22161590b088582d39
Diffstat (limited to 'test/nilptr5.go')
-rw-r--r--test/nilptr5.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/nilptr5.go b/test/nilptr5.go
index 2c48c0b26..118746e4a 100644
--- a/test/nilptr5.go
+++ b/test/nilptr5.go
@@ -1,7 +1,7 @@
// errorcheck -0 -d=nil
-// +build !wasm
-// +build !aix
+//go:build !wasm && !aix
+// +build !wasm,!aix
// Copyright 2018 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -20,7 +20,7 @@ func f5(p *float32, q *float64, r *float32, s *float64) float64 {
return x + y
}
-type T [29]byte
+type T struct{ b [29]byte }
func f6(p, q *T) {
x := *p // ERROR "removed nil check"
@@ -28,6 +28,6 @@ func f6(p, q *T) {
}
// make sure to remove nil check for memory move (issue #18003)
-func f8(t *[8]int) [8]int {
+func f8(t *struct{ b [8]int }) struct{ b [8]int } {
return *t // ERROR "removed nil check"
}