A reference in this context. For product code a namespace that only test * code declares does not exist. When the reference came to nothing and such * a namespace was passed over on the way, what it names may be a test * declaration: asked once more the way test code sees it, a name that is * there is test_only_target; one that is not there either keeps the reason * it has without that namesp
| 5610 | * there is test_only_target; one that is not there either keeps the reason |
| 5611 | * it has without that namespace. */ |
| 5612 | static cs_res_t resolve_ref(const cs_ctx_t *c, const cs_ref_t *r) { |
| 5613 | bool passed_over = false; |
| 5614 | cs_ctx_t seen = *c; |
| 5615 | seen.passed_over = &passed_over; |
| 5616 | cs_res_t res = resolve_form(&seen, r); |
| 5617 | if (!passed_over || !reason_is_nothing(&res)) { |
| 5618 | return res; |
| 5619 | } |
| 5620 | cs_ctx_t as_test = *c; |
| 5621 | as_test.prod = false; |
| 5622 | as_test.passed_over = NULL; |
| 5623 | cs_res_t there = resolve_form(&as_test, r); |
| 5624 | bool nothing = reason_is_nothing(&there) || |
| 5625 | (there.st == CS_UNRES && there.reason == CBM_DOCLINK_REASON_UNPARSEABLE); |
| 5626 | return nothing ? res : res_unres(CBM_DOCLINK_REASON_TEST_ONLY); |
| 5627 | } |
| 5628 | |
| 5629 | /* ── Context ─────────────────────────────────────────────────────── */ |
| 5630 |
no test coverage detected