[clang-tools-extra] [clangd][modules] Discover opened module files outside the compilation database (PR #218958)
Chuanqi Xu via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 26 20:09:20 PDT 2026
================
@@ -865,11 +868,63 @@ class ModuleNameToSourceCache {
llvm::StringMap<llvm::StringMap<std::string>> ModuleNameToMultipleSourceCache;
};
+bool isCXXModuleFile(PathRef File) {
+ namespace types = clang::driver::types;
+ auto Lang =
+ types::lookupTypeForExtension(llvm::sys::path::extension(File).substr(1));
+ return Lang == types::TY_CXXModule;
+}
----------------
ChuanqiXu9 wrote:
This is not accurate. But I can accept this as a compromise. Let's add a comment for it.
https://github.com/llvm/llvm-project/pull/218958
More information about the cfe-commits
mailing list