| 2274 | /* ── Scope scan: definitions ─────────────────────────────────────── */ |
| 2275 | |
| 2276 | static int rs_defkey_cmp(const void *a, const void *b) { |
| 2277 | const rs_defkey_t *x = (const rs_defkey_t *)a; |
| 2278 | const rs_defkey_t *y = (const rs_defkey_t *)b; |
| 2279 | if (x->line != y->line) { |
| 2280 | return x->line < y->line ? -1 : 1; |
| 2281 | } |
| 2282 | int c = strcmp(x->name, y->name); |
| 2283 | return c ? c : (x->def > y->def) - (x->def < y->def); |
| 2284 | } |
| 2285 | |
| 2286 | /* The order in which the graph buffer lets definitions of one qualified name |
| 2287 | * replace each other (cbm_gbuf_upsert_node, same file): start line, then |
nothing calls this directly
no outgoing calls
no test coverage detected