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

Function find_resolved

tests/test_go_lsp.c:26–34  ·  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

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