| 32 | } |
| 33 | |
| 34 | static int usage_count(const CBMFileResult *r, const char *caller, const char *target) { |
| 35 | int count = 0; |
| 36 | for (int i = 0; i < r->usages.count; i++) { |
| 37 | const CBMUsage *usage = &r->usages.items[i]; |
| 38 | if (usage->kind == CBM_USAGE_VALUE && usage->ref_name && |
| 39 | strcmp(usage->ref_name, target) == 0 && |
| 40 | (!caller || qn_ends_with(usage->enclosing_func_qn, caller))) { |
| 41 | count++; |
| 42 | } |
| 43 | } |
| 44 | return count; |
| 45 | } |
| 46 | |
| 47 | static int call_reference_count(const CBMFileResult *r, const char *caller, const char *target) { |
| 48 | int count = 0; |
no test coverage detected