From: cuishuang Date: Sat, 16 Aug 2025 15:22:19 +0000 (+0800) Subject: cmd/compile/internal: make function comments match function names X-Git-Tag: go1.26rc1~1060 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=c7d8bda459;p=gostls13.git cmd/compile/internal: make function comments match function names Change-Id: I2ebadb87a4f60487c8f720930a72bc5ef953d7cf Reviewed-on: https://go-review.googlesource.com/c/go/+/696695 Reviewed-by: Carlos Amedee Auto-Submit: Keith Randall Reviewed-by: Keith Randall Reviewed-by: Keith Randall LUCI-TryBot-Result: Go LUCI --- diff --git a/src/cmd/compile/internal/loopvar/loopvar_test.go b/src/cmd/compile/internal/loopvar/loopvar_test.go index b19962f0fd..0265dd06ee 100644 --- a/src/cmd/compile/internal/loopvar/loopvar_test.go +++ b/src/cmd/compile/internal/loopvar/loopvar_test.go @@ -50,7 +50,7 @@ var cases = []testcase{ {"1", "", 0, []string{"for_nested.go"}}, } -// TestLoopVar checks that the GOEXPERIMENT and debug flags behave as expected. +// TestLoopVarGo1_21 checks that the GOEXPERIMENT and debug flags behave as expected. func TestLoopVarGo1_21(t *testing.T) { switch runtime.GOOS { case "linux", "darwin": diff --git a/src/cmd/compile/internal/pgoir/irgraph.go b/src/cmd/compile/internal/pgoir/irgraph.go index 914a4da8b5..e879d438a6 100644 --- a/src/cmd/compile/internal/pgoir/irgraph.go +++ b/src/cmd/compile/internal/pgoir/irgraph.go @@ -158,7 +158,7 @@ func New(profileFile string) (*Profile, error) { }, nil } -// initializeIRGraph builds the IRGraph by visiting all the ir.Func in decl list +// createIRGraph builds the IRGraph by visiting all the ir.Func in decl list // of a package. func createIRGraph(namedEdgeMap pgo.NamedEdgeMap) *IRGraph { g := &IRGraph{ diff --git a/src/cmd/compile/internal/ssa/func_test.go b/src/cmd/compile/internal/ssa/func_test.go index 6923aaa58e..a1e639e048 100644 --- a/src/cmd/compile/internal/ssa/func_test.go +++ b/src/cmd/compile/internal/ssa/func_test.go @@ -470,7 +470,7 @@ func opcodeMap(f *Func) map[Op]int { return m } -// opcodeCounts checks that the number of opcodes listed in m agree with the +// checkOpcodeCounts checks that the number of opcodes listed in m agree with the // number of opcodes that appear in the function. func checkOpcodeCounts(t *testing.T, f *Func, m map[Op]int) { n := opcodeMap(f)