The raw type def whose QN is `r`'s scope (`scope_len` bytes of r's QN) and * whose span holds r, or NULL. */
| 2209 | /* The raw type def whose QN is `r`'s scope (`scope_len` bytes of r's QN) and |
| 2210 | * whose span holds r, or NULL. */ |
| 2211 | static const CBMDefinition *cbm_misnested_raw_parent(const CBMDefinition *defs, int raw_count, |
| 2212 | const CBMDefinition *r, size_t scope_len) { |
| 2213 | for (int k = 0; k < raw_count; k++) { |
| 2214 | const CBMDefinition *p = &defs[k]; |
| 2215 | if (p != r && p->qualified_name && p->name && cbm_def_label_is_type(p->label) && |
| 2216 | p->start_line <= r->start_line && p->end_line >= r->end_line && |
| 2217 | strncmp(p->qualified_name, r->qualified_name, scope_len) == 0 && |
| 2218 | p->qualified_name[scope_len] == '\0') { |
| 2219 | return p; |
| 2220 | } |
| 2221 | } |
| 2222 | return NULL; |
| 2223 | } |
| 2224 | |
| 2225 | /* Index just past a preprocessor directive starting at `i` (its continuation |
| 2226 | * lines included), and the lines it spans added to *line. */ |
no test coverage detected