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

Function c1_lsp_caller

tests/test_extraction.c:7848–7859  ·  view source on GitHub ↗

Caller QN of the first C-LSP resolution whose callee QN ends in ". ". */

Source from the content-addressed store, hash-verified

7846
7847/* Caller QN of the first C-LSP resolution whose callee QN ends in ".<leaf>". */
7848static const char *c1_lsp_caller(CBMFileResult *r, const char *leaf) {
7849 size_t ll = strlen(leaf);
7850 for (int i = 0; i < r->resolved_calls.count; i++) {
7851 const CBMResolvedCall *rc = &r->resolved_calls.items[i];
7852 size_t cl = rc->callee_qn ? strlen(rc->callee_qn) : 0;
7853 if (cl > ll && rc->callee_qn[cl - ll - 1] == '.' &&
7854 strcmp(rc->callee_qn + cl - ll, leaf) == 0) {
7855 return rc->caller_qn ? rc->caller_qn : "";
7856 }
7857 }
7858 return "";
7859}
7860
7861/* xxhash.h shape: `XXH_PUBLIC_API <RetT> name(...)` has one leading identifier more than
7862 * the grammar admits. tree-sitter-cpp (every .h is C++) recovers it as `RetT::name` with a

Callers 1

test_extraction.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected