Phase 3: Create DATA_FLOWS edges by linking callers through Route to handlers. */
| 921 | |
| 922 | /* Phase 3: Create DATA_FLOWS edges by linking callers through Route to handlers. */ |
| 923 | static void create_data_flows(cbm_gbuf_t *gb) { |
| 924 | const cbm_gbuf_node_t **routes = NULL; |
| 925 | int route_count = 0; |
| 926 | if (cbm_gbuf_find_by_label(gb, "Route", &routes, &route_count) != 0 || route_count == 0) { |
| 927 | return; |
| 928 | } |
| 929 | |
| 930 | int flows = 0; |
| 931 | int skipped = 0; |
| 932 | |
| 933 | for (int ri = 0; ri < route_count; ri++) { |
| 934 | caller_edge_ref_t caller_edges[CBM_SZ_64]; |
| 935 | int n_callers = collect_caller_edges(gb, routes[ri]->id, caller_edges, CBM_SZ_64); |
| 936 | create_route_data_flows(gb, routes[ri], caller_edges, n_callers, &flows, &skipped); |
| 937 | } |
| 938 | |
| 939 | if (flows > 0 || skipped > 0) { |
| 940 | char buf1[CBM_SZ_16]; |
| 941 | char buf2[CBM_SZ_16]; |
| 942 | snprintf(buf1, sizeof(buf1), "%d", flows); |
| 943 | snprintf(buf2, sizeof(buf2), "%d", skipped); |
| 944 | cbm_log_info("pass.data_flows", "created", buf1, "skipped_has_call", buf2); |
| 945 | } |
| 946 | } |
| 947 | |
| 948 | /* ── SvelteKit filesystem-based route extractor ────────────────────── |
| 949 | * |
no test coverage detected