[all-commits] [llvm/llvm-project] ef9559: [Coverage] Resurrect Branch:FalseCnt in SwitchStmt...
NAKAMURA Takumi via All-commits
all-commits at lists.llvm.org
Wed Dec 18 15:41:29 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ef955908302b6a6170e9775d89a94846fde12ebf
https://github.com/llvm/llvm-project/commit/ef955908302b6a6170e9775d89a94846fde12ebf
Author: NAKAMURA Takumi <geek4civic at gmail.com>
Date: 2024-12-19 (Thu, 19 Dec 2024)
Changed paths:
M clang/lib/CodeGen/CoverageMappingGen.cpp
M clang/test/CoverageMapping/switch.cpp
M clang/test/CoverageMapping/switchmacro.c
Log Message:
-----------
[Coverage] Resurrect Branch:FalseCnt in SwitchStmt that was pruned in #112694 (#120418)
I missed that FalseCnt for each Case was used to calculate percentage in
the SwitchStmt. At the moment I resurrect them.
In `!HasDefaultCase`, the pair of Counters shall be `[CaseCountSum,
FalseCnt]`. (Reversal of before #112694)
I think it can be considered as the False count on SwitchStmt.
FalseCnt shall be folded (same as current impl) in the coming
SingleByteCoverage changes, since percentage would not make sense.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list