From c7d8bda4596d2ad4970c8052fded76284b2f0be1 Mon Sep 17 00:00:00 2001 From: cuishuang Date: Sat, 16 Aug 2025 23:22:19 +0800 Subject: [PATCH] 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 --- src/cmd/compile/internal/loopvar/loopvar_test.go | 2 +- src/cmd/compile/internal/pgoir/irgraph.go | 2 +- src/cmd/compile/internal/ssa/func_test.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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) -- 2.52.0