)]}'
{
  "commit": "69f97e01f74d7c0bc7b429f3aa471a2c22855379",
  "tree": "ed36350b902fb767a65a35016fcda0f57cdbae43",
  "parents": [
    "e33749537254d42895ef084e482faaba230fddc2"
  ],
  "author": {
    "name": "yashanil98",
    "email": "79158725+yashanil98@users.noreply.github.com",
    "time": "Fri Jun 26 12:01:26 2026 -0700"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Fri Jun 26 12:04:10 2026 -0700"
  },
  "message": "fix(cpp): suppress self-warning on deprecated enum value imports (#28012)\n\nFixes #18205.\n\nprotoc generates a class-scoped alias for each nested enum value (for example `static constexpr Status OK \u003d Result_Status_OK;`). For a value marked `[deprecated \u003d true]`, the alias is itself `[[deprecated]]` and initializes from the deprecated enumerator, so protoc\u0027s own generated header trips `-Wdeprecated-declarations`. That breaks downstream builds compiled with `-Werror`, even though the user does not control the generated code. This wraps the alias in the existing `PROTOBUF_IGNORE_DEPRECATION_START`/`PROTOBUF_IGNORE_DEPRECATION_STOP` macros, as suggested by a maintainer on the issue. Non-deprecated values are unchanged.\n\nTest: added two cases to `generator_unittest.cc` (one asserting the wrap is emitted for a deprecated value, one asserting no macro is emitted otherwise).\n\n  ./build/tests --gtest_filter\u003d\u0027CppGeneratorTest.*\u0027\n\nResult: all CppGeneratorTest cases pass (including the two new ones).\n\nCloses #28012\n\nCOPYBARA_INTEGRATE_REVIEW\u003dhttps://github.com/protocolbuffers/protobuf/pull/28012 from yashanil98:fix/issue-18205-enum-symbol-import-deprecation 2cad7bc5bc05a69a40ebc27b77afc4f7b24a7993\nPiperOrigin-RevId: 938705268\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "f889a0c4f023d03da859dbeb626024640b9de28f",
      "old_mode": 33188,
      "old_path": "src/google/protobuf/compiler/cpp/enum.cc",
      "new_id": "4caecc98749b6deae5fe79a346929c35ea071a90",
      "new_mode": 33188,
      "new_path": "src/google/protobuf/compiler/cpp/enum.cc"
    },
    {
      "type": "modify",
      "old_id": "06d3717e475de8de7287e32cdadf546681175280",
      "old_mode": 33188,
      "old_path": "src/google/protobuf/compiler/cpp/generator_unittest.cc",
      "new_id": "e58ed4d57a848a47c447f0eacbf1400eba52662f",
      "new_mode": 33188,
      "new_path": "src/google/protobuf/compiler/cpp/generator_unittest.cc"
    }
  ]
}
