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

Function find_def_flex

tests/test_extraction_inheritance.c:135–145  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

133
134/* Find def trying Class / Interface / Struct / any-label fallback. */
135static CBMDefinition *find_def_flex(CBMFileResult *r, const char *name) {
136 CBMDefinition *d;
137 if ((d = find_def(r, "Class", name)))
138 return d;
139 if ((d = find_def(r, "Interface", name)))
140 return d;
141 if ((d = find_def(r, "Struct", name)))
142 return d;
143 /* Fallback: any label — covers languages where the extractor uses custom labels */
144 return find_def_any(r, name);
145}
146
147/*
148 * 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