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
@@ -60,4 +60,18 @@ struct Limits {
|
||||
std::span<const Definition> known,
|
||||
const Definition &target, const Limits & = Limits{});
|
||||
|
||||
struct Outgoing {
|
||||
Definition to;
|
||||
std::vector<Range> from_ranges;
|
||||
auto operator<=>(const Outgoing &) const = default;
|
||||
};
|
||||
|
||||
// Calls made inside CALLER, grouped by their resolved callee definition.
|
||||
// A call is attributed to the innermost known definition containing it in the
|
||||
// same file, so calls inside nested functions are not reported for CALLER.
|
||||
// Calls without a resolved callee are omitted: an item must point somewhere.
|
||||
[[nodiscard]] std::vector<Outgoing> outgoing(std::span<const Call>,
|
||||
std::span<const Definition> known,
|
||||
const Definition &caller, const Limits & = Limits{});
|
||||
|
||||
} // namespace vls::features::call_hierarchy
|
||||
@@ -72,6 +72,9 @@ class EditorDiagnostics {
|
||||
// Incoming calls of a prepared item, grouped by enclosing definition.
|
||||
[[nodiscard]] Void::LanguageServer::Protocol::Json
|
||||
call_hierarchy_incoming(const Void::LanguageServer::Protocol::Json &item) const;
|
||||
// Calls made inside a prepared item's function.
|
||||
[[nodiscard]] Void::LanguageServer::Protocol::Json
|
||||
call_hierarchy_outgoing(const Void::LanguageServer::Protocol::Json &item) const;
|
||||
// Parameter-type hints from the compiler signature, within the range.
|
||||
[[nodiscard]] Void::LanguageServer::Protocol::Json inlay_hints(std::string_view uri,
|
||||
Documents::Range range) const;
|
||||
|
||||
Reference in new issue
Block a user