)]}'
{
  "commit": "3adb118dcd8c42c0970b8b3b5663ffe193ea7df5",
  "tree": "43fd304fb39952da6f19ada4f1337cd44de291ac",
  "parents": [
    "b4f533fde2dfa612f2a9a1b54d2947988d85eb99"
  ],
  "author": {
    "name": "cuishuang",
    "email": "imcusg@gmail.com",
    "time": "Wed Aug 12 13:15:37 2026 +0800"
  },
  "committer": {
    "name": "Peter Weinberger",
    "email": "pjw@google.com",
    "time": "Wed Aug 19 06:21:24 2026 -0700"
  },
  "message": "go/analysis/passes/modernize: preserve evaluation effects in slicessort\n\nThe slicessort analyzer matches slice expressions in the comparison\nfunction using syntactic equality. If the expression has side effects,\nreplacing sort.Slice with slices.Sort reduces repeated evaluations to one.\n\nOnly offer the modernization when the slice expression has no effects.\nAdd a regression test for a function call used as the slice expression.\n\nFixes golang/go#80844\n\nChange-Id: I16fa33103cabd363766a147dcd06243d4fa32347\nReviewed-on: https://go-review.googlesource.com/c/tools/+/813780\nReviewed-by: Madeline Kalil \u003cmkalil@google.com\u003e\nLUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com \u003cgolang-scoped@luci-project-accounts.iam.gserviceaccount.com\u003e\nReviewed-by: Peter Weinberger \u003cpjw@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ecfe99e2f22bc7645e6f54e44ee2fe7c4534db56",
      "old_mode": 33188,
      "old_path": "go/analysis/passes/modernize/sortslice.go",
      "new_id": "c8535f110e62a14d9bcfdadb3407b6c3413f58db",
      "new_mode": 33188,
      "new_path": "go/analysis/passes/modernize/sortslice.go"
    },
    {
      "type": "modify",
      "old_id": "3b690bd83a56037b19b5a03f1c7a1189b9540a8a",
      "old_mode": 33188,
      "old_path": "go/analysis/passes/modernize/testdata/src/slicessort/slicessort.go",
      "new_id": "4b35e8a948e6b3c677ea72f25120f500519142df",
      "new_mode": 33188,
      "new_path": "go/analysis/passes/modernize/testdata/src/slicessort/slicessort.go"
    },
    {
      "type": "modify",
      "old_id": "e2990c2a77bd4e3b0d5f36bfa384550a4fad75b7",
      "old_mode": 33188,
      "old_path": "go/analysis/passes/modernize/testdata/src/slicessort/slicessort.go.golden",
      "new_id": "b206cffb7a0dbec3bb86c13c5fe7becc49bdc31e",
      "new_mode": 33188,
      "new_path": "go/analysis/passes/modernize/testdata/src/slicessort/slicessort.go.golden"
    }
  ]
}
