Issue |
140209
|
Summary |
[clangd] Cannot build the module if it's declared in a file with `.ixx` extension
|
Labels |
new issue
|
Assignees |
|
Reporter |
SidneyCogdill
|
Like another [bug](https://github.com/llvm/llvm-project/issues/139189), this bug is discovered when working with C++ module support for the ["Proxy"](https://github.com/microsoft/proxy) library.
I've created a [tiny project](https://github.com/SidneyCogdill/clangd_modules_bug_showcase/tree/clangd_ixx_bug) to demonstrate the bug. Pull the project using the following command:
```sh
git clone \
--single-branch \
--branch clangd_ixx_bug \
--recursive \
https://github.com/SidneyCogdill/clangd_modules_bug_showcase.git
```
(Note: It's a good security practice to audit the project before opening it in your editor)
The module file `proxy.ixx` exposes the interfaces in global fragment. It cannot be built by clangd when the module file ends with `.ixx` file extension. Renaming it to `proxy.cpp` or `proxy.cppm` fixes the issue.
This bug only affects clangd. Clang can build the module without any issue.
clangd version:
```
~> clangd-21 --version
Ubuntu clangd version 21.0.0 (++20250501084208+9b1051281e43-1~exp1~20250501084221.26)
Features: linux+grpc
Platform: x86_64-pc-linux-gnu
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs