-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicates in response of "textDocument/references" request #2195
Comments
The issue is almost certainly related to Windows using a case-insensitive filesystem (#108). Notice how in the log, one path has a lowercase |
Oh i didn't spot that, makes sense. I will check on monday if this is the case also on the big project on my work pc |
Taking a closer look at the logs, the source of the inconsistency is likely that the Please see clangd/vscode-clangd#687 (comment) for a suggested workaround. |
Ok, I confirm the same The interesting thing is that this project is compiled passing EDIT: sometimes the same issue happens anyway, even after changing all "argument files" to the lowercase |
I would expect it's the value of the |
Clangd often reports the same reference to an object multiple times to the text editor.
If the editor doesn't do filtering itself, multiple references will be shown to the user.
I noticed that this issue has been reported already to the LSP I use here and identified as an issue in clangd itself, so I think it is present since then.
Logs
I'm not very practical of writing a Cmake config, so probably my CmakeLists.txt is not so well-structured (anyway it reproduces the problem).
I opened lib.c with gVim and asked for the references to the function
libRepro
An extract from the log is here:
As you can see there is a duplicate, which gets shown on vim.
Full log: clangd.log
My example project: llvm-bug-reproducer.zip
System information
Output of
clangd --version
:Downloaded from the github "releases" page.
The same issue is present also in clangd 18.1.3
Editor/LSP plugin:
(g)vim 9.1 with coc-clangd
Operating system:
Windows 10 version 22H2
The text was updated successfully, but these errors were encountered: