Skip to content

When multiple projects in the workspace have methods with the same name, code navigation always jumps to the method indexed first. #10

@dingzhou-beck

Description

@dingzhou-beck

Please describe the problem.
For hints on what information is helpful, see: https://clangd.llvm.org/troubleshooting.html

If you can, provide a minimal chunk of code that shows the problem (either inline, or attach it if larger).

Logs
Please attach the clangd log from the "Output" window if you can.
If possible, run with --log=verbose - note that the logs will include the contents of open files!

System information
Clangd version (from the log, or clangd --version): 16.0.2
clangd extension version:v0.1.0
Operating system:windows10

step:

  1. The following are my sample projects, namely debug_project and release_project. Currently, for verification purposes, the two projects are exactly the same.
Image
  1. After closing all open files and restarting VSCode, you will encounter an error in code navigation.

Image

In release_project, the a() function jumps to the debug_project project, but in fact, it should jump to the a method in the aa.c file of the release_project project.

  1. When I opened aa.c in release_project, the jump back to normal would be restored:

Image

In actual usage scenarios, it is more common to encounter situations where the jump target file is not opened, which can lead to jump errors. For the same project, I used 'cpp-tools' and found that it could jump normally. Is there any way to solve it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions