go/analysis/passes/composite: allow InternalFuzzTarget

Add InternalFuzzTarget to the allowlist for the composites analyzer.
Other testing-internal struct types produced by the testmain generator
are already in there.

Fixes golang/go#51623

Change-Id: Ibf91d476ea781c97835157973efc97ce0f987665
Reviewed-on: https://go-review.googlesource.com/c/tools/+/391875
Reviewed-by: Robert Findley <rfindley@google.com>
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
Trust: Jamal Carvalho <jamal@golang.org>
Trust: Michael Matloob <matloob@golang.org>
diff --git a/go/analysis/passes/composite/testdata/src/a/a_fuzz_test.go b/go/analysis/passes/composite/testdata/src/a/a_fuzz_test.go
new file mode 100644
index 0000000..20b652e
--- /dev/null
+++ b/go/analysis/passes/composite/testdata/src/a/a_fuzz_test.go
@@ -0,0 +1,16 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build go1.18
+// +build go1.18
+
+package a
+
+import "testing"
+
+var fuzzTargets = []testing.InternalFuzzTarget{
+	{"Fuzz", Fuzz},
+}
+
+func Fuzz(f *testing.F) {}
diff --git a/go/analysis/passes/composite/whitelist.go b/go/analysis/passes/composite/whitelist.go
index 1e5f5fd..f84c187 100644
--- a/go/analysis/passes/composite/whitelist.go
+++ b/go/analysis/passes/composite/whitelist.go
@@ -26,9 +26,10 @@
 	"unicode.Range16": true,
 	"unicode.Range32": true,
 
-	// These three structs are used in generated test main files,
+	// These four structs are used in generated test main files,
 	// but the generator can be trusted.
-	"testing.InternalBenchmark": true,
-	"testing.InternalExample":   true,
-	"testing.InternalTest":      true,
+	"testing.InternalBenchmark":  true,
+	"testing.InternalExample":    true,
+	"testing.InternalTest":       true,
+	"testing.InternalFuzzTarget": true,
 }