Skip to content
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

Call hierarchy points to an empty line #2036

Open
bstaletic opened this issue May 11, 2024 · 3 comments
Open

Call hierarchy points to an empty line #2036

bstaletic opened this issue May 11, 2024 · 3 comments

Comments

@bstaletic
Copy link

bstaletic commented May 11, 2024

I have been testing my call/type hierarchies pull request for YouCompleteMe and while testing on the LLDB codebase I have been greeted by a nasty vim backtrace.
Unfortunately, all attempts at minimizing the source code needed for reproducing the problem failed.

Links to the correct YCM/ycmd pull requests (in case anyone wants to try for whatever reason):
ycm-core/ycmd#1733
ycm-core/YouCompleteMe#4221

Steps to repro:

  1. Open lldb/source/Plugins/ABI/AArch64/ABIAArch64.cpp
  2. Go to line 25, column 18. That's I in void ABIAArch64::Initialize() {.
  3. Request incoming call hierarchy for Initialize().
  4. One result found inside LLDB_PLUGIN_DEFINE(ABIAArch64), as expected.
  5. Request incoming calls for lldb_initialize_ABIAArch64.
  6. One result found... Method: Initialize - SystemInitializerFull.cpp:32. That line is empty on current master, which is llvm/llvm-project@31774b6

SystemInitializerFull::Initialize() is defined on line 52.

Logs

compile_commands.json

clangd_stderr.log

System information

Output of clangd --version:

clangd version 18.1.1 (https://github.com/ycm-core/llvm abd06744664af7852747fc7190a38b36473ac13b)
Features: linux
Platform: x86_64-unknown-linux-gnu

But also seen on macOS.

Editor/LSP plugin:

vim/YouCompleteMe/ycmd

Operating system:

Gentoo Linux, but also seen on macOS.

@bstaletic
Copy link
Author

Asciinema recording:

https://asciinema.org/a/DLz2I1O63oltKqaKXsfej0Efj

@HighCommander4
Copy link

I haven't looked into the specifics here, but I've seen issues like this caused by an out of date clangd index. It's worth ruling that out by deleting the project's .cache/clangd/index, restarting clangd, waiting for it to rebuild the index, and then trying the call hierarchy again.

@bstaletic
Copy link
Author

Fair point, I'll let clangd rebuild cache anew and report back.
It will defiitely take some time, considering the performance of my computer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants