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

Function calls

__tests__/cpp-macro-and-constructor-calls.test.ts:49–55  ·  view source on GitHub ↗

`calls` callees of a function, as `kind qualifiedName (file)`.

(cg: CodeGraph, caller: string)

Source from the content-addressed store, hash-verified

47
48/** `calls` callees of a function, as `kind qualifiedName (file)`. */
49function calls(cg: CodeGraph, caller: string): string[] {
50 return cg
51 .getCallees(fn(cg, caller).id)
52 .filter((r) => r.edge.kind === 'calls')
53 .map((r) => `${r.node.kind} ${r.node.qualifiedName} (${r.node.filePath})`)
54 .sort();
55}
56
57describe('#1838 — a macro invocation is not a call to a same-named function', () => {
58 it('reproduction: the macro from an included header does not bind to the decoy function', async () => {

Calls 3

mapMethod · 0.80
fnFunction · 0.70
getCalleesMethod · 0.45

Tested by

no test coverage detected