[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)
Jean-Pierre Coetzee via cfe-commits
cfe-commits at lists.llvm.org
Thu May 30 08:14:44 PDT 2024
jpc0 wrote:
Just a note, I am building on Windows with MSVC cl.exe and ninja and get this:
```
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\include\memory(3138): error C2027: use of undefined type 'clang::clangd::ProjectModules'
```
While building ConfigCompile.cpp.obj, I was able to solve it by adding `#include "ProjectModules.h"` into `ConfigCompile.h` before `#include "GlobalCompilationDatabase.h"`.
Likewise with `BackgroundIndexLoader.cpp.obj` and adding to 'index\background.h`, it appears any time `GlobalCompilationDatabase.h` is included that `ProjectModules.h` would need to be included first. It also seems like `ProjectModules.h` cannot be included in `GlobalCompilationDatabase.h` due to a circular dependency. I am still building so there might be similar issues somewhere else in the codebase but this is the base issue.
Not sure how to resolve other than adding a `#include` everywhere, seems like there an issue with include order on MSVC or something.
https://github.com/llvm/llvm-project/pull/66462
More information about the cfe-commits
mailing list