]> Cypherpunks repositories - gostls13.git/commitdiff
cmd: fix some issues in the comments
authorcuishuang <imcusg@gmail.com>
Mon, 8 Dec 2025 04:18:59 +0000 (12:18 +0800)
committerGopher Robot <gobot@golang.org>
Tue, 9 Dec 2025 18:42:20 +0000 (10:42 -0800)
Change-Id: Id2c4152b43c7ee1a687e49da7dda5a690e554231
Reviewed-on: https://go-review.googlesource.com/c/go/+/727900
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Keith Randall <khr@golang.org>

src/cmd/compile/internal/inline/inlheur/analyze_func_params.go
src/cmd/compile/internal/test/testdata/arith_test.go
src/cmd/dist/test.go
src/cmd/go/internal/doc/pkg.go
src/cmd/go/internal/generate/generate_test.go
src/cmd/link/internal/ld/fips140.go
src/cmd/link/internal/loader/loader_test.go

index f6bd84c3f507f134c616f8058d67f8f2601429ea..abfcb3ab3289978506c1dc877bccdabb2d1ff960 100644 (file)
@@ -122,9 +122,9 @@ func (pa *paramsAnalyzer) findParamIdx(n *ir.Name) int {
 
 type testfType func(x ir.Node, param *ir.Name, idx int) (bool, bool)
 
-// paramsAnalyzer invokes function 'testf' on the specified expression
-// 'x' for each parameter, and if the result is TRUE, or's 'flag' into
-// the flags for that param.
+// checkParams invokes function 'testf' on the specified expression 'x'
+// for each parameter. If the result is TRUE, it OR's either 'flag' or 'mayflag'
+// into the flags for that param, depending on whether we are in a conditional context.
 func (pa *paramsAnalyzer) checkParams(x ir.Node, flag ParamPropBits, mayflag ParamPropBits, testf testfType) {
        for idx, p := range pa.params {
                if !pa.top[idx] && pa.values[idx] == ParamNoInfo {
index 34ac73c068dc6cc62102b6c9b3e722ec6880a390..6f53618b59432d4cf5dd3759b5eb7f5f91a00dc1 100644 (file)
@@ -223,7 +223,7 @@ func testArithConstShift(t *testing.T) {
        }
 }
 
-// overflowConstShift_ssa verifies that constant folding for shift
+// overflowConstShift64_ssa verifies that constant folding for shift
 // doesn't wrap (i.e. x << MAX_INT << 1 doesn't get folded to x << 0).
 //
 //go:noinline
@@ -1408,7 +1408,7 @@ var (
        // These have to be global to avoid getting constant-folded in the function body:
        // as locals, prove can see that they are actually constants.
        sixU, nineteenU uint64 = 6, 19
-       sixS, nineteenS int64 = 6, 19
+       sixS, nineteenS int64  = 6, 19
 )
 
 // testDivisibility confirms that rewrite rules x%c ==0 for c constant are correct.
index f8d19ac34c562f6e71a7c384d58514e3586e1ede..aae16c1637f1ff027f7fc710b1267eb1ff1b7cc1 100644 (file)
@@ -1236,7 +1236,7 @@ func (t *tester) externalLinkPIE() bool {
        return t.internalLinkPIE() && t.extLink()
 }
 
-// supportedBuildMode reports whether the given build mode is supported.
+// supportedBuildmode reports whether the given build mode is supported.
 func (t *tester) supportedBuildmode(mode string) bool {
        switch mode {
        case "c-archive", "c-shared", "shared", "plugin", "pie":
index 7b5e00365d04a12cd12de493fea5f270d1af0b25..8020807d4a3f777cd3f0afa6024ec6c6ff86a058 100644 (file)
@@ -526,7 +526,7 @@ func (pkg *Package) funcsDoc() {
        }
 }
 
-// funcsDoc prints all type documentation, if any, including a header.
+// typesDoc prints all type documentation, if any, including a header.
 func (pkg *Package) typesDoc() {
        var header bool
        for _, typ := range pkg.doc.Types {
index 2eef917e7e275883a22974667145768ffe2e5037..b11ed505450ba8a30adeccc4c92bf7ab086851ce 100644 (file)
@@ -79,7 +79,7 @@ var defEnvMap = map[string]string{
        "_X":      "Y",
 }
 
-// TestGenerateCommandShortHand - similar to TestGenerateCommandParse,
+// TestGenerateCommandShorthand - similar to TestGenerateCommandParse,
 // except:
 //  1. if the result starts with -command, record that shorthand
 //     before moving on to the next test.
index c1887ee50a337eb5a93a170b564ed481aa4b8f84..8ab6f39910248296ee30b2f513e57f72891ebf62 100644 (file)
@@ -398,7 +398,7 @@ func machofips(ctxt *Link, exe, fipso string) error {
        return f.Close()
 }
 
-// machofips updates go:fipsinfo after external linking
+// elffips updates go:fipsinfo after external linking
 // on systems using ELF (most Unix systems).
 func elffips(ctxt *Link, exe, fipso string) error {
        // Open executable both for reading ELF and for the fipsObj.
index 541f42b7d1a99a9a674c689aa63cfc2ed42d2159..7f7a75d9f4330b3ce1810cd51f3f843d1a4a944b 100644 (file)
@@ -14,7 +14,7 @@ import (
        "testing"
 )
 
-// dummyAddSym adds the named symbol to the loader as if it had been
+// addDummyObjSym adds the named symbol to the loader as if it had been
 // read from a Go object file. Note that it allocates a global
 // index without creating an associated object reader, so one can't
 // do anything interesting with this symbol (such as look at its