Issue 148370
Summary [clangd] clangd doesn't work with some file names with --experimental-modules-support option
Labels new issue
Assignees
Reporter FSK-idk
    Here I have an example repo: https://github.com/FSK-idk/clangd-test

When I build the project and look at the file `somefile.cppm` in particular, I don't see any clangd info:

<img width="1332" height="306" alt="Image" src="" />
&nbsp;

However, if I do one of the following, the info will come back:
- comment `import std;` in the file `types.cppm`
- rename the file `somefile.cppm`, for example, to `asd.cppm` (or to some other name, but there is a chance that clangd will not work with the new name either)
- add a new file `asd.cppm` with the content `export module asd;` (same here, maybe some other name)
- remove `--experimental-modules-support` option (but then module info won't be available, but at least highlight will work)

Here is what it looks like if I rename `somefile.cppm` to `asd.cppm`:

<img width="1331" height="310" alt="Image" src="" />
&nbsp;

Versions
```
❯ clangd --version
clangd version 20.1.7
Features: linux
Platform: x86_64-pc-linux-gnu
❯ clang --version 
clang version 20.1.7
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
```

I also tested it with 21.0.0git version I built today and got the same result.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to