MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / find_resolved

Function find_resolved

tests/test_go_lsp.c:27–35  ·  view source on GitHub ↗

Search resolved_calls for a match where caller contains callerSub * and callee contains calleeSub. Returns index or -1. */

Source from the content-addressed store, hash-verified

25/* Search resolved_calls for a match where caller contains callerSub
26 * and callee contains calleeSub. Returns index or -1. */
27static int find_resolved(const CBMFileResult *r, const char *callerSub, const char *calleeSub) {
28 for (int i = 0; i < r->resolved_calls.count; i++) {
29 const CBMResolvedCall *rc = &r->resolved_calls.items[i];
30 if (rc->caller_qn && strstr(rc->caller_qn, callerSub) && rc->callee_qn &&
31 strstr(rc->callee_qn, calleeSub))
32 return i;
33 }
34 return -1;
35}
36
37/* Assert that a resolved call exists. Returns the index. */
38static int require_resolved(const CBMFileResult *r, const char *callerSub, const char *calleeSub) {

Callers 2

require_resolvedFunction · 0.70
test_go_lsp.cFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected