Find channel source node (enclosing function or file). */
| 1251 | |
| 1252 | /* Find channel source node (enclosing function or file). */ |
| 1253 | static const cbm_gbuf_node_t *find_channel_src(cbm_pipeline_ctx_t *ctx, const CBMChannel *ch, |
| 1254 | const char *rel) { |
| 1255 | const cbm_gbuf_node_t *node = NULL; |
| 1256 | if (ch->enclosing_func_qn && ch->enclosing_func_qn[0]) { |
| 1257 | node = cbm_gbuf_find_by_qn(ctx->gbuf, ch->enclosing_func_qn); |
| 1258 | } |
| 1259 | if (!node) { |
| 1260 | char *file_qn = cbm_pipeline_fqn_compute(ctx->project_name, rel, "__file__"); |
| 1261 | node = cbm_gbuf_find_by_qn(ctx->gbuf, file_qn); |
| 1262 | free(file_qn); |
| 1263 | } |
| 1264 | return node; |
| 1265 | } |
| 1266 | |
| 1267 | /* Create Channel nodes + EMITS/LISTENS_ON edges for one file. */ |
| 1268 | static void create_channel_edges(cbm_pipeline_ctx_t *ctx, const CBMFileResult *result, |
no test coverage detected