MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / calls

Function calls

__tests__/cpp-element-access-calls.test.ts:39–45  ·  view source on GitHub ↗

`calls` callees of a function or method, as `qualifiedName`.

(cg: CodeGraph, caller: string)

Source from the content-addressed store, hash-verified

37
38/** `calls` callees of a function or method, as `qualifiedName`. */
39function calls(cg: CodeGraph, caller: string): string[] {
40 return cg
41 .getCallees(callable(cg, caller).id)
42 .filter((r) => r.edge.kind === 'calls')
43 .map((r) => r.node.qualifiedName)
44 .sort();
45}
46
47/** `calls` callees of a function or method, as `qualifiedName:startLine`, which tells overloads apart. */
48function callsAt(cg: CodeGraph, caller: string): string[] {

Calls 3

mapMethod · 0.80
callableFunction · 0.70
getCalleesMethod · 0.45

Tested by

no test coverage detected