)]}'
{
  "commit": "05ffd0dc29bccc839b453b94918ba8e088f4397c",
  "tree": "6f9768e95840b6b9b7675c857af9a068cd2609e8",
  "parents": [
    "e4b93b70c92ffc581a16578acc2ef58e02824076"
  ],
  "author": {
    "name": "Andy Kaylor",
    "email": "akaylor@nvidia.com",
    "time": "Fri Apr 10 11:12:29 2026 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Fri Apr 10 11:12:29 2026 -0700"
  },
  "message": "[CIR] Handle globals with vptr init (#191291)\n\nWhen a class contains virtual functions but no data members and has a\ntrivial constructor, global variables of that type are initialized with\na vptr. CIR was incorrectly creating the global variable with the type\nof the vtable (an anonymous record) rather than the class type.\n\nWhen replacing structors with aliases, we were calling a function to\nupdate argument types at the call sites, but this was only necessary\nbecause we initially generated the call using the same incorrect type\nthat we used for the global. The type correction wasn\u0027t implemented\nbecause we hadn\u0027t encountered a case where it was needed. Having found\nsuch a case led me to diagnose the problem as above, and I verified that\nthe same test case compiled without -mconstructor-aliases just failed in\nthe verifier because we never hit the replacement code. I\u0027m now\nconvinced that this argument type fixup isn\u0027t necessary, so I replaced\nthe fixup function with an assert.\n\nAssisted-by: Cursor / claude-4.6-opus-high",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "778f9bfdfd0c1cf6b6ac0854b053681a19febed2",
      "old_mode": 33188,
      "old_path": "clang/include/clang/CIR/Dialect/IR/CIRTypes.td",
      "new_id": "b177eab08ccad011fc121916e9481f48bfdb970e",
      "new_mode": 33188,
      "new_path": "clang/include/clang/CIR/Dialect/IR/CIRTypes.td"
    },
    {
      "type": "modify",
      "old_id": "fe9a8ee1957c4cc0229512c6bf0eb9f58c1a7997",
      "old_mode": 33188,
      "old_path": "clang/lib/CIR/CodeGen/CIRGenExprConstant.cpp",
      "new_id": "330e51c214dfc0b38693aecd853e903d2e93206b",
      "new_mode": 33188,
      "new_path": "clang/lib/CIR/CodeGen/CIRGenExprConstant.cpp"
    },
    {
      "type": "modify",
      "old_id": "2037b92e2b5d1ba2124bdcb9800d31f0fc94b2d9",
      "old_mode": 33188,
      "old_path": "clang/lib/CIR/CodeGen/CIRGenModule.cpp",
      "new_id": "3f0f493f5a50b1fa3ced8d688cc114673ca6a55c",
      "new_mode": 33188,
      "new_path": "clang/lib/CIR/CodeGen/CIRGenModule.cpp"
    },
    {
      "type": "modify",
      "old_id": "266510de84fd0e066943d932860961153f283a4b",
      "old_mode": 33188,
      "old_path": "clang/lib/CIR/CodeGen/CIRGenModule.h",
      "new_id": "0bb07f0815d43f9e96ff021372e588ac4ed1ee4b",
      "new_mode": 33188,
      "new_path": "clang/lib/CIR/CodeGen/CIRGenModule.h"
    },
    {
      "type": "modify",
      "old_id": "488fc100f981b8ca874d37034fe1875fd71f900f",
      "old_mode": 33188,
      "old_path": "clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp",
      "new_id": "c352ef91d1ee2e6fa1c6bd8ff908a463d9cec7b9",
      "new_mode": 33188,
      "new_path": "clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "1520485cf3597ca277b81a97517163b3800d3db4",
      "new_mode": 33188,
      "new_path": "clang/test/CIR/CodeGen/global-ptr-init.cpp"
    }
  ]
}
