Hi, I found a bug about the go to definition and go to declaration when used clangd in vscode. Please see the code example below:
#include <stdio.h>
struct str {
int v;
};
int main() {
str s;
s.v = 10;
return 0;
}
I performed Go-to-def/decl on the variable s in declaration statement at line 6, but it jumps to the variable s at line 7. Actually, I think this is Go to Use or Find References, rather than Go-to-def or decl (should be unchanged at line 6). So, this is a bug.
System information
Clangd version:
Apple clangd version 15.0.0 (clang-1500.3.9.4)
Features: mac+xpc
Platform: x86_64-apple-darwin23.5.0; target=arm64-apple-darwin23.5.0
clangd extension version: Version 0.1.28: March 20, 2024
Link: https://github.com/clangd/vscode-clangd/issues/634
Hi, I found a bug about the go to definition and go to declaration when used clangd in vscode. Please see the code example below:
I performed Go-to-def/decl on the variable
s
in declaration statement at line 6, but it jumps to the variables
at line 7. Actually, I think this is Go to Use or Find References, rather than Go-to-def or decl (should be unchanged at line 6). So, this is a bug.System information
Clangd version: Apple clangd version 15.0.0 (clang-1500.3.9.4) Features: mac+xpc Platform: x86_64-apple-darwin23.5.0; target=arm64-apple-darwin23.5.0
clangd extension version: Version 0.1.28: March 20, 2024
Operating system: MacOS