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

Function inspect_synthetic_add_occurrences

tests/test_parallel.c:1879–1907  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1877} lsp_synthetic_index_probe_t;
1878
1879static void inspect_synthetic_add_occurrences(CBMFileResult **result_cache, int file_count,
1880 void *ud) {
1881 lsp_synthetic_index_probe_t *probe = (lsp_synthetic_index_probe_t *)ud;
1882 if (!probe) {
1883 return;
1884 }
1885 for (int file = 0; file < file_count; file++) {
1886 CBMFileResult *result = result_cache[file];
1887 if (!result) {
1888 continue;
1889 }
1890 for (int i = 0; i < result->calls.count; i++) {
1891 const CBMCall *call = &result->calls.items[i];
1892 if (!call->requires_lsp_resolution || !call->callee_name ||
1893 strcmp(call->callee_name, "__add__") != 0 ||
1894 !cbm_pipeline_source_site_present(call->site_start_byte, call->site_end_byte)) {
1895 continue;
1896 }
1897 probe->carrier_count++;
1898 const CBMResolvedCall *resolved =
1899 cbm_pipeline_find_lsp_resolution(&result->resolved_calls, call, false);
1900 if (resolved &&
1901 cbm_pipeline_source_site_eq(call->site_start_byte, call->site_end_byte,
1902 resolved->site_start_byte, resolved->site_end_byte)) {
1903 probe->exact_match_count++;
1904 }
1905 }
1906 }
1907}
1908
1909TEST(parallel_lsp_exact_index_handles_repeated_synthetic_occurrences_without_linear_scan) {
1910 enum { OCCURRENCES = 128 };

Callers

nothing calls this directly

Tested by

no test coverage detected