| 1954 | } |
| 1955 | |
| 1956 | static int ts514_resolved_count(const CBMResolvedCallArray *resolved, const CBMCall *call, |
| 1957 | const char *target, const char *strategy) { |
| 1958 | if (!call) |
| 1959 | return -1; |
| 1960 | int count = 0; |
| 1961 | for (int i = 0; i < resolved->count; i++) { |
| 1962 | const CBMResolvedCall *rc = &resolved->items[i]; |
| 1963 | if (rc->kind == CBM_RESOLVED_INVOCATION && rc->confidence > 0 && rc->caller_qn && |
| 1964 | strcmp(rc->caller_qn, call->enclosing_func_qn) == 0 && rc->callee_qn && |
| 1965 | (!target || strcmp(rc->callee_qn, target) == 0) && |
| 1966 | rc->site_start_byte == call->site_start_byte && |
| 1967 | rc->site_end_byte == call->site_end_byte && |
| 1968 | (!strategy || (rc->strategy && strcmp(rc->strategy, strategy) == 0))) |
| 1969 | count++; |
| 1970 | } |
| 1971 | return count; |
| 1972 | } |
| 1973 | |
| 1974 | static int ts514_definition_count(const CBMFileResult *r, const char *qn) { |
| 1975 | int count = 0; |