You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Short version: including sol in the global module fragment of a C++20 module causes clangd to crash. The code otherwise compiles (msvc) and runs fine.
I use CLion which uses Clangd for syntax highlighting. Clangd uses LLVM under the hood. The code is actually compiled with msvc.
I have hit a strange issue where if I create a module and 1) include sol/sol.hpp in the global module fragment and 2) use any sol classes in function definitions inside the module then syntax highlighting breaks for all downstream code that imports the module.
I narrowed this down to an issue with clangd crashing, which implies LLVM is failing to compile sol. Could be a red herring, but if I don't use the single header and then remove sol/table.hpp and sol/state.hpp from sol/sol.hpp the error goes away. The clangd crash dumps are not particularly helpful other than mentioning that templates relating to std::optional are undefined. Possibly an issue with the sol optional implementation breaking LLVM (but I am not actually sure)?
Note that I have tried this with both the latest release and the newest development versions (which includes the 'construct' issue fix) required for LLVM issues.
I'm not sure how to proceed with debugging this. Any help or suggestions would be beneficial. I realise that module support is still early for LLVM.
The text was updated successfully, but these errors were encountered:
Short version: including sol in the global module fragment of a C++20 module causes clangd to crash. The code otherwise compiles (msvc) and runs fine.
I use CLion which uses Clangd for syntax highlighting. Clangd uses LLVM under the hood. The code is actually compiled with msvc.
I have hit a strange issue where if I create a module and 1) include sol/sol.hpp in the global module fragment and 2) use any sol classes in function definitions inside the module then syntax highlighting breaks for all downstream code that imports the module.
I narrowed this down to an issue with clangd crashing, which implies LLVM is failing to compile sol. Could be a red herring, but if I don't use the single header and then remove sol/table.hpp and sol/state.hpp from sol/sol.hpp the error goes away. The clangd crash dumps are not particularly helpful other than mentioning that templates relating to std::optional are undefined. Possibly an issue with the sol optional implementation breaking LLVM (but I am not actually sure)?
Note that I have tried this with both the latest release and the newest development versions (which includes the 'construct' issue fix) required for LLVM issues.
I'm not sure how to proceed with debugging this. Any help or suggestions would be beneficial. I realise that module support is still early for LLVM.
The text was updated successfully, but these errors were encountered: