Open alfaix opened 2 months ago
Could be related to https://github.com/llvm/llvm-project/issues/58540, although there the discussion is about importing header units.
Ah upon closer examination seems to be same as #78850
That said, I thought the -fskip-odr-check-in-gmf
should have fixed it for now
@llvm/issue-subscribers-clang-modules
Author: Arsen Kitov (alfaix)
@llvm/issue-subscribers-clangd
Author: Arsen Kitov (alfaix)
Would you like to test again on trunk?
Hey, I'm trying to get modules to work with clangd following this PR.
However, when I run
clangd
with the following files:Put
-std=c++23 -stdlib=libc++
and all the-fmodule
things incompile_commands.json
, clangd reports an ODR violation, saying the 2 definitions ofstd::error_category
from the 2 includes are different:E[12:04:26.095] [module_odr_violation_missing_decl] Line 3: in included file: 'std::error_category::message' from module '' is not present in definition of 'std::error_category' in module 'b.<global>'
The setup is sensitive to small changes - e.g., removing std::convertible from the concept leads to the error disappearing. I put the repro in a small repo for convenience.
Tested with
Ubuntu clang version 20.0.0 (++20240727042143+9a3e66e314e6-1~exp1~20240727042317.1828)
straight out of apt.llvm.org snapshot repo.