Skip to content

Commit 3e2eea9

Browse files
committed
Extend known for Go 1.23 compiler directives
1 parent 21d3bfd commit 3e2eea9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

checkcompilerdirectives/checkcompilerdirectives.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -72,23 +72,22 @@ func isKnown(directive string) bool {
7272
return false
7373
}
7474

75+
// Found by running the following command on the source of go.
76+
// git grep -o -E -h '//go:[a-z_-]+' -- ':!**/*_test.go' ':!test/' ':!**/testdata/**' | sort -u
77+
// See https://pkg.go.dev/cmd/[email protected]#hdr-Compiler_Directives
7578
var known = []string{
76-
// Found by running the following command on the source of go.
77-
// git grep -o -E -h '//go:[a-z_]+' -- ':!**/*_test.go' ':!test/' ':!**/testdata/**' | sort -u
78-
"binary",
7979
"build",
80-
"buildsomethingelse",
8180
"cgo_dynamic_linker",
8281
"cgo_export_dynamic",
8382
"cgo_export_static",
8483
"cgo_import_dynamic",
8584
"cgo_import_static",
8685
"cgo_ldflag",
8786
"cgo_unsafe_args",
87+
"debug",
8888
"embed",
8989
"generate",
9090
"linkname",
91-
"name",
9291
"nocheckptr",
9392
"noescape",
9493
"noinline",
@@ -101,5 +100,6 @@ var known = []string{
101100
"systemstack",
102101
"uintptrescapes",
103102
"uintptrkeepalive",
103+
"wasmimport",
104104
"yeswritebarrierrec",
105105
}

0 commit comments

Comments
 (0)