When using LSP "go to definition" on the LOG macro use inside the main() function I would expect my cursor to jump to the definition in test.cc. Otherwise my client either lists every definition, or worse, jumps to the first one it wants.
This is not right as there is clearly no doubt about which macro is being in use from the compiler point of view.
Observed behavior
.ccls
:test.cc
:undef LOG
define LOG(args) fprintf(stderr, args)
int main() { LOG("Log\n"); return 0; }
Expected behavior
When using LSP "go to definition" on the
LOG
macro use inside themain()
function I would expect my cursor to jump to the definition intest.cc
. Otherwise my client either lists every definition, or worse, jumps to the first one it wants. This is not right as there is clearly no doubt about which macro is being in use from the compiler point of view.Note: Maybe similar to https://github.com/MaskRay/ccls/issues/885
Steps to reproduce
System information