clangd_references
Find all references to a C/C++ symbol at a given file, line, and column, with optional declaration inclusion. Returns sorted 1-based locations for navigation and impact analysis.
Instructions
查找符号的全部引用(textDocument/references)。返回按文件/行/列排序的 1-based 位置列表;includeDeclaration 控制是否包含声明本身。
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file": "<file>",
"line": "<line>",
"column": "<column>"
},
"name": "clangd_references"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | 源文件路径:绝对路径,或相对 projectRoot 的路径 | |
| line | Yes | 1-based 行号 | |
| limit | No | 最多返回多少条引用,默认 maxResults | |
| column | Yes | 1-based 列号(UTF-16) | |
| includeDeclaration | No | 是否包含声明位置,默认 true |