From a4fce2a2cea42b49b612872ecf708c441ef9e538 Mon Sep 17 00:00:00 2001 From: Ondrej Ille <34539154+Blebowski@users.noreply.github.com> Date: Thu, 6 Feb 2025 20:58:17 +0100 Subject: [PATCH] fix missing functional coverage when summing subhierarchies. (#1157) --- NEWS.md | 2 ++ src/cov/cov-report.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/NEWS.md b/NEWS.md index 449169529..7b5f15ef9 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,8 @@ ## Unreleased changes - Fixed invalid LLVM IR generation which could cause a crash with LLVM 14 (#1145). +- Functional coverage is now reported correctly when summing from nested + hierarchies ## Version 1.15.1 - 2025-01-22 - Fixed a crash when a subprogram is called with too many named arguments diff --git a/src/cov/cov-report.c b/src/cov/cov-report.c index 6098c39f6..eee397d1e 100644 --- a/src/cov/cov-report.c +++ b/src/cov/cov-report.c @@ -1427,6 +1427,8 @@ static void cover_report_hier_children(cover_rpt_hier_ctx_t *ctx, ctx->nested_stats.total_expressions += sub_ctx.nested_stats.total_expressions; ctx->nested_stats.hit_states += sub_ctx.nested_stats.hit_states; ctx->nested_stats.total_states += sub_ctx.nested_stats.total_states; + ctx->nested_stats.hit_functional += sub_ctx.nested_stats.hit_functional; + ctx->nested_stats.total_functional += sub_ctx.nested_stats.total_functional; } else cover_report_hier_scope(ctx, it, dir, summf, skipped);