)]}'
{
  "commit": "3f3c50c68dd03908c44d56e3fe88e28e30202dc4",
  "tree": "5cc1e821f8d51caf1df7517d21b98952fc9bc696",
  "parents": [
    "b24a6eccb7fccd4e02cb14a3952e7890f3133287"
  ],
  "author": {
    "name": "Haojian Wu",
    "email": "hokein.wu@gmail.com",
    "time": "Fri Sep 06 12:37:21 2024 +0200"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Fri Sep 06 03:41:59 2024 -0700"
  },
  "message": "[clang] Emit -Wdangling diagnoses for cases where a gsl-pointer is construct from a gsl-owner object in a container. (#104556)\n\nThe warning is not emitted for the case `string_view c \u003d\nstd::vector\u003cstd::string\u003e({\"\"}).at(0);` because we bail out during the\nvisit of the LHS at [this\npoint](https://github.com/llvm/llvm-project/blob/5d2c324fea2d7cf86ec50e4bb6b680acf89b2ed5/clang/lib/Sema/CheckExprLifetime.cpp#L341-L343)\nin the code.\n\nThis bailout was introduced in [this\ncommit](https://github.com/llvm/llvm-project/commit/bcd0798c47ca865f95226859893016a17402441e)\nto address a false positive with\n`vector\u003cvector::iterator\u003e({\"\"}).at(0);`. This PR refines that fix by\nensuring that, for initialization involving a gsl-pointer, we only\nconsider constructor calls that take the gsl-owner object.\n\nFixes #100384.\n\nGitOrigin-RevId: a918fa117acfbb20d29039cb8bddab159a8173dc\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "a2e91fd648cce2438f947e4b78d0eb907d43b535",
      "old_mode": 33188,
      "old_path": "docs/ReleaseNotes.rst",
      "new_id": "684484ccd298fb631940c600fde0a454fb0b259e",
      "new_mode": 33188,
      "new_path": "docs/ReleaseNotes.rst"
    },
    {
      "type": "modify",
      "old_id": "8f4d5d50669f14755bfe874e543b4b1d4e2b4a90",
      "old_mode": 33188,
      "old_path": "lib/Sema/CheckExprLifetime.cpp",
      "new_id": "f1507ebb9a506809cdef1d862c2cd89aadda151d",
      "new_mode": 33188,
      "new_path": "lib/Sema/CheckExprLifetime.cpp"
    },
    {
      "type": "modify",
      "old_id": "67d1ceaa02d039dad75df1c3d2e7ed155f75ef3d",
      "old_mode": 33188,
      "old_path": "test/Sema/warn-lifetime-analysis-nocfg.cpp",
      "new_id": "59357d0730a7d9f8b380136572c1544adfd6e13c",
      "new_mode": 33188,
      "new_path": "test/Sema/warn-lifetime-analysis-nocfg.cpp"
    }
  ]
}
