)]}'
{
  "commit": "ab898f32c60689d1d47d0b6de66c30d3476994bb",
  "tree": "db546647b4b504a935e897a5b97ad9116dd0d494",
  "parents": [
    "ee312fc182510bc6dda072f51956a9e76f6e2638"
  ],
  "author": {
    "name": "Victor Chernyakin",
    "email": "chernyakin.victor.j@outlook.com",
    "time": "Mon Sep 08 08:30:01 2025 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Mon Sep 08 08:30:01 2025 -0700"
  },
  "message": "[clang-tidy][NFC] Do less unnecessary work in `NoLintDirectiveHandler` (#147553)\n\nSummary:\n- `NoLintBlockToken` is too big: it stores a whole `NoLintToken` inside\nitself, when all it needs from that `NoLintToken` is its `Pos` and\n`ChecksGlob`.\n- `formNoLintBlocks` builds up a vector of unmatched tokens, which are\nlater transformed into errors. We can skip the middle step and make\n`formNoLintBlocks` create errors directly.\n- In `generateCache`, the line `Cache[FileName] \u003d ...;`\ndefault-constructs a cache entry only to immediately overwrite it. We\ncan avoid that by using `Cache.try_emplace(FileName, ...);` instead.\n- `NoLintToken`\u0027s constructor takes `const std::optional\u003cstd::string\u003e\u0026`\nwhen all it needs is `const std::optional\u003cStringRef\u003e\u0026`. This forces its\ncaller, `getNoLints`, to create temporary strings.\n- `NoLintToken::checks` returns `std::optional\u003cstd::string\u003e` by value,\ncreating unnecessary copies in `formNoLintBlocks`.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "a8c978901b5516123616d59db04e4ac24db550fb",
      "old_mode": 33188,
      "old_path": "clang-tools-extra/clang-tidy/NoLintDirectiveHandler.cpp",
      "new_id": "bbae2c171f790d0b9103e92e1e4a5f88fc72d028",
      "new_mode": 33188,
      "new_path": "clang-tools-extra/clang-tidy/NoLintDirectiveHandler.cpp"
    },
    {
      "type": "modify",
      "old_id": "f66285672d04aae69e6c687c5caf31b5ae01f859",
      "old_mode": 33188,
      "old_path": "clang-tools-extra/clang-tidy/NoLintDirectiveHandler.h",
      "new_id": "e862195abaabbe8bfc26a55351d1502fe69aa00f",
      "new_mode": 33188,
      "new_path": "clang-tools-extra/clang-tidy/NoLintDirectiveHandler.h"
    }
  ]
}
