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

Function find_def_flex

tests/test_extraction_inheritance.c:131–141  ·  view source on GitHub ↗

Find def trying Class / Interface / Struct / any-label fallback. */

Source from the content-addressed store, hash-verified

129
130/* Find def trying Class / Interface / Struct / any-label fallback. */
131static CBMDefinition *find_def_flex(CBMFileResult *r, const char *name) {
132 CBMDefinition *d;
133 if ((d = find_def(r, "Class", name)))
134 return d;
135 if ((d = find_def(r, "Interface", name)))
136 return d;
137 if ((d = find_def(r, "Struct", name)))
138 return d;
139 /* Fallback: any label — covers languages where the extractor uses custom labels */
140 return find_def_any(r, name);
141}
142
143/*
144 * Generic runner for one inherit_case_t row.

Callers 1

run_inherit_caseFunction · 0.85

Calls 2

find_def_anyFunction · 0.85
find_defFunction · 0.70

Tested by

no test coverage detected