[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

Ben Boeckel via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 5 13:57:20 PDT 2023


================
@@ -45,6 +45,10 @@ class GlobalCompilationDatabase {
     return std::nullopt;
   }
 
+  virtual std::vector<std::string> getAllFilesInProjectOf(PathRef File) const {
----------------
mathstuf wrote:

`compile_commands.json` probably isn't the best place for it as it cannot be filled out at the same time (e.g., CMake knows the compile commands once it generates; it does *not* know the relevant module information until the build happens and updating the database would be a huge bottleneck).

I have a prototype (that needs some more work) that outlines such a `module_commands.json`-like file in [this CMake branch](https://gitlab.kitware.com/ben.boeckel/cmake/-/commits/module-cdb). Of note that doesn't work:

- flags is not filled out; and
- the commands that merge the per-target databases into a top-level one does not work.

https://github.com/llvm/llvm-project/pull/66462


More information about the cfe-commits mailing list