[clang] [clang-tools-extra] [libcxx] [clang][Modules] Remove unnecessary includes of `Module.h` (PR #93417)

kadir çetinkaya via cfe-commits cfe-commits at lists.llvm.org
Tue May 28 01:36:11 PDT 2024


================
@@ -42,7 +41,11 @@
 #include <memory>
 #include <vector>
 
-namespace clang::clangd {
+namespace clang {
+
+class Module;
----------------
kadircet wrote:

yes that's mostly something we try in clangd, but fair point, feel free to ignore this one.

i was mostly pushing because this is just a leaf hence having that dependency won't affect compile times drastically, and we'll probably keep pulling it through other headers anyway. (e.g. even after this change, we still have `clangd/SourceCode.h -> clang/Lex/HeaderSearch.h -> clang/Lex/DirectoryLookup.h -> clang/Lex/ModuleMap.h -> clang/Basic/Module.h, hence this isn't really changing much in practice, while hiding the dependency)

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


More information about the cfe-commits mailing list