)]}'
{
  "commit": "2d31fc85a847759a5ea1fb39718a3851d57913c3",
  "tree": "9d5e94766638e5eb5c1cf33db5c465e3532d7243",
  "parents": [
    "e47d5eb4541d5f377d9a57ef2157dbb3a41a85e6"
  ],
  "author": {
    "name": "Naveen Seth Hanig",
    "email": "naveen.hanig@outlook.com",
    "time": "Mon Jul 21 22:34:14 2025 +0200"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Mon Jul 21 22:34:14 2025 +0200"
  },
  "message": "Reland [clang][modules-driver] Add scanner to detect C++20 module presence (#147630)\n\nThis patch is part of a series to natively support C++20 module usage\nfrom the Clang driver (without requiring an external build system). This\nintroduces a new scanner that detects C++20 module usage in source files\nwithout using the preprocessor or lexer.\n\nFor now, it is enabled only with the `-fmodules-driver` flag and serves\nsolely diagnostic purposes. In the future, the scanner will be enabled\nfor any (modules-driver compatible) compilation with two or more inputs,\nand will help the driver determine whether to implicitly enable the\nmodules driver.\n\nSince the scanner adds very little overhead, we are also exploring\nenabling it for compilations with only a single input. This approach\ncould allow us to detect `import std` usage in a single-file\ncompilation, which would then activate the modules driver. For\nperformance measurements on this, see\nhttps://github.com/naveen-seth/llvm-dev-cxx-modules-check-benchmark.\n\nRFC:\n\nhttps://discourse.llvm.org/t/rfc-modules-support-simple-c-20-modules-use-from-the-clang-driver-without-a-build-system\n\nThis patch relands commit ded1426. The CI failure is resolved by\nremoving the compatibility warning for using the `-fmodules-driver` flag\nwith pre-C++20 standards, which also better aligns its behavior with\nother features/flags supported only in newer standards.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "34b6c0d7a8acdadd7c14f1b5e56aed7630e990e7",
      "old_mode": 33188,
      "old_path": "clang/include/clang/Basic/DiagnosticDriverKinds.td",
      "new_id": "104b387fbfc6677bef0994aa141aad54b0edbdad",
      "new_mode": 33188,
      "new_path": "clang/include/clang/Basic/DiagnosticDriverKinds.td"
    },
    {
      "type": "modify",
      "old_id": "ccb18aa37447ea73d8bf9cbc14467c7e771edf39",
      "old_mode": 33188,
      "old_path": "clang/include/clang/Basic/DiagnosticGroups.td",
      "new_id": "78726ecc869db393a770ea46d9e96dbf42253598",
      "new_mode": 33188,
      "new_path": "clang/include/clang/Basic/DiagnosticGroups.td"
    },
    {
      "type": "modify",
      "old_id": "d9e328fe918bcac2a72b5cd23f404d4eeb557cb3",
      "old_mode": 33188,
      "old_path": "clang/include/clang/Driver/Driver.h",
      "new_id": "71adffa7417a464a8d95e71ab1881ca0c17f06cb",
      "new_mode": 33188,
      "new_path": "clang/include/clang/Driver/Driver.h"
    },
    {
      "type": "modify",
      "old_id": "e30c152cbce2e797ff4a0a09cde429aafb479375",
      "old_mode": 33188,
      "old_path": "clang/include/clang/Driver/Options.td",
      "new_id": "aaf9cf17e6e80182ebd249d5d17c7cc8a4fede6d",
      "new_mode": 33188,
      "new_path": "clang/include/clang/Driver/Options.td"
    },
    {
      "type": "modify",
      "old_id": "acdc9e2bf9aa409da906daf9f38e902df7d44d8a",
      "old_mode": 33188,
      "old_path": "clang/include/clang/Lex/DependencyDirectivesScanner.h",
      "new_id": "2c2525528b5d858e30c2e6a7f4e78c438b8cb2d8",
      "new_mode": 33188,
      "new_path": "clang/include/clang/Lex/DependencyDirectivesScanner.h"
    },
    {
      "type": "modify",
      "old_id": "eeb482392ae91aef24389a4ce575137147216ec7",
      "old_mode": 33188,
      "old_path": "clang/lib/Driver/Driver.cpp",
      "new_id": "9173699c8c83c1d2f0abe0f1d715d4c49b0cd50d",
      "new_mode": 33188,
      "new_path": "clang/lib/Driver/Driver.cpp"
    },
    {
      "type": "modify",
      "old_id": "9ccff5e3342d54e61e5df14a7ff5d97ce9f5d29f",
      "old_mode": 33188,
      "old_path": "clang/lib/Lex/DependencyDirectivesScanner.cpp",
      "new_id": "7c9050e32a7df5aff7e3299ff35a0ac749648fa7",
      "new_mode": 33188,
      "new_path": "clang/lib/Lex/DependencyDirectivesScanner.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "a434587a7875993eaf1390857551d5ed446183a5",
      "new_mode": 33188,
      "new_path": "clang/test/Driver/modules-driver-cxx20-module-usage-scanner.cpp"
    }
  ]
}
