Serve outgoing call hierarchy
callHierarchy/outgoingCalls groups calls attributed to the prepared function's innermost enclosing definition by callee, with registered core tests for grouping, innermost attribution, unresolved-callee omission and bounds. Real stdio evidence shows the observer reports only the declarator span, so body calls cannot be attributed without guessing; the matrix records that limitation.
This commit is contained in:
1 parent
cec4e7d717
commit
a098e45dc9
9 files changed
+178
-2
No files matched your search
@@ -454,6 +454,14 @@ DispatchResult Server::handle(std::string_view body) {
|
||||
*uri, {static_cast<std::uint32_t>(*line_value),
|
||||
static_cast<std::uint32_t>(*character_value)}));
|
||||
}
|
||||
if (*method == "callHierarchy/outgoingCalls") {
|
||||
if (!diagnostics_ || !diagnostics_->supports_occurrences())
|
||||
return error(id, -32601, "Method not found");
|
||||
const auto *item = member(params, "item");
|
||||
if (!item)
|
||||
return error(id, -32602, "Expected a call hierarchy item");
|
||||
return reply(id, "result", diagnostics_->call_hierarchy_outgoing(*item));
|
||||
}
|
||||
if (*method == "callHierarchy/incomingCalls") {
|
||||
if (!diagnostics_ || !diagnostics_->supports_occurrences())
|
||||
return error(id, -32601, "Method not found");
|
||||
|
||||
Reference in new issue
Block a user