================
@@ -25,6 +25,8 @@
 namespace clang {
 namespace clangd {
 
+class ProjectModules;
----------------
kadircet wrote:

as others have also pointed out, this forward declaration is working around a 
cyclic dependency. can we restructure this a little by:
- moving definition of ProjectModules interface into 
`GlobalCompilationDatabase.h`, it's pretty thin, has only 2 methods.
- replacing `ProjectModules::create`, which is the reason why we have the 
cyclic dependency, with a new header `ScanningProjectModules.h` and 
`std::unique_ptr<ProjectModules> scanningProjectModules(std::shared_ptr<const 
clang::tooling::CompilationDatabase> CDB, const ThreadsafeFS &TFS);`. This way 
we can also safely postpone the discussion around passing the wrong global-cdb 
into projectmodules, and can run the extra resource-dir injection on top of the 
vanilla tooling-cdb. moreover, we avoid making a full copy of the source file 
names in the project.

https://github.com/llvm/llvm-project/pull/66462
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to