)]}'
{
  "commit": "e3db5e0cb17199bcb30fba51ff6cf58094fa1f7c",
  "tree": "aba62013b4e61803b0ac7c8c485f96f8a461e536",
  "parents": [
    "36f8b96c88e44a0ef4735f6befecd1a2f04f3eb6"
  ],
  "author": {
    "name": "lrzlin",
    "email": "linrunze@loongson.cn",
    "time": "Mon Apr 20 10:33:09 2026 +0800"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Mon Apr 20 10:33:09 2026 +0800"
  },
  "message": "[clang][LoongArch] Check target features in CheckLoongArchBuiltinFunctionCall (#191811)\n\nAdd target features check in `CheckLoongArchBuiltinFunctionCall`, thus\nwe could through an error\nwhen pass the `-mno-lsx` to clang while using the builtin LSX intrinsics\nfor global variables instead of\ntrigger an ICE.\n\nMinimal Example:\n```\n// clang-20 --march\u003dloongarch64 -mno-lsx -S -o - \"x.cc\"\n__attribute__((__vector_size__(16))) long foo \u003d __builtin_lsx_vinsgr2vr_w(foo, 0, 0);\n```\nand the compiler will output\n```\nx.cc:1:49: error: builtin needs target feature lsx\n    1 | __attribute__((__vector_size__(16))) long foo \u003d __builtin_lsx_vinsgr2vr_w(foo, 0, 0);\n      |                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n1 error generated.\n```\n\nFix https://github.com/llvm/llvm-project/issues/131771",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "c57a6f91a3dfce00ce89dc85e106d17b23e1a734",
      "old_mode": 33188,
      "old_path": "clang/lib/Sema/SemaLoongArch.cpp",
      "new_id": "bf09b300dc52cb6d0520f52264918c7993f7fd22",
      "new_mode": 33188,
      "new_path": "clang/lib/Sema/SemaLoongArch.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "d122ac8408c5a46e96d325c701606f8b8401d328",
      "new_mode": 33188,
      "new_path": "clang/test/Sema/builtin-loongarch-check-target-feature.cpp"
    }
  ]
}
