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

Function ts514_resolved_count

tests/test_ts_lsp.c:1956–1972  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1954}
1955
1956static int ts514_resolved_count(const CBMResolvedCallArray *resolved, const CBMCall *call,
1957 const char *target, const char *strategy) {
1958 if (!call)
1959 return -1;
1960 int count = 0;
1961 for (int i = 0; i < resolved->count; i++) {
1962 const CBMResolvedCall *rc = &resolved->items[i];
1963 if (rc->kind == CBM_RESOLVED_INVOCATION && rc->confidence > 0 && rc->caller_qn &&
1964 strcmp(rc->caller_qn, call->enclosing_func_qn) == 0 && rc->callee_qn &&
1965 (!target || strcmp(rc->callee_qn, target) == 0) &&
1966 rc->site_start_byte == call->site_start_byte &&
1967 rc->site_end_byte == call->site_end_byte &&
1968 (!strategy || (rc->strategy && strcmp(rc->strategy, strategy) == 0)))
1969 count++;
1970 }
1971 return count;
1972}
1973
1974static int ts514_definition_count(const CBMFileResult *r, const char *qn) {
1975 int count = 0;

Callers 1

test_ts_lsp.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected