)]}'
{
  "commit": "d32ccd8f95f198c6d848f361aa2a9a2a1a7cee1e",
  "tree": "5cca4b02066fdcf77d5caa669bc5c5ef519a8348",
  "parents": [
    "1246ce661adcdec292f8c6b5f7d66e03e713da86"
  ],
  "author": {
    "name": "Vitaly Goldshteyn",
    "email": "goldvitaly@google.com",
    "time": "Mon Oct 26 17:20:28 2026 -0700"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Thu Oct 29 13:17:22 2026 -0700"
  },
  "message": "Assume StatusBuilder conversion to Status returns non-OK when non-empty.\n\nWhen an rvalue `StatusBuilder` is converted to `absl::Status`, the conversion delegates to the out-of-line `CreateStatusAndConditionallyLog` helper. Because that helper is out-of-line, the compiler could not previously prove that a non-empty `StatusBuilder` always produces a non-OK `absl::Status`. Consequently, whenever `RETURN_IF_ERROR` was used inside a function returning `absl::StatusOr` (or when constructing `absl::StatusOr` from a `StatusBuilder`), the `absl::StatusOr` constructor emitted a redundant check and crash-handler call on the error path to guard against an OK status.\n\nMaintain the invariant that `StatusBuilder` holds an allocated internal representation if and only if its status is non-OK by clearing the internal representation when `SetCode` or `SetErrorCode` is called with an OK status code (using out-of-line destruction in `SetErrorCode` so `Rep` destruction is not inlined at call sites). With that invariant established, add an optimizer assumption in the rvalue `absl::Status` conversion operator that a non-empty `StatusBuilder` always produces a non-OK `absl::Status`.\n\nThis allows the compiler to eliminate the redundant status check when constructing `absl::StatusOr` from `StatusBuilder`, reducing code size by 18 bytes per function (and up to 44 bytes per `SetErrorCode` call site) and improving error-path latency by 3 to 8 ns in microbenchmarks.\n\nPiperOrigin-RevId: 1007675020\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "8b30f618c537651d9ae948225dcd5d7c7fcefa87",
      "old_mode": 33188,
      "old_path": "absl/status/status_builder.cc",
      "new_id": "7e9cd4ec1f8b15034d49a0ee4af70f5185d7396a",
      "new_mode": 33188,
      "new_path": "absl/status/status_builder.cc"
    },
    {
      "type": "modify",
      "old_id": "55ab7a8355e580732eaf43c74c23136f998f9bfd",
      "old_mode": 33188,
      "old_path": "absl/status/status_builder.h",
      "new_id": "4d6752a51e1fdb24a3831e81659a949aeb01b8c1",
      "new_mode": 33188,
      "new_path": "absl/status/status_builder.h"
    },
    {
      "type": "modify",
      "old_id": "28fd6b945d78a1644df47697699339c2bdc20ccd",
      "old_mode": 33188,
      "old_path": "absl/status/status_builder_test.cc",
      "new_id": "3ff40bf7382eb643365d779e8610b07b8537b84a",
      "new_mode": 33188,
      "new_path": "absl/status/status_builder_test.cc"
    }
  ]
}
