[clang] [llvm] [Coverage] Introduce "partial fold" on BranchRegion (PR #112694)

NAKAMURA Takumi via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 18 01:46:54 PDT 2024


================
@@ -125,7 +125,7 @@ json::Array renderRegions(ArrayRef<coverage::CountedRegion> Regions) {
 json::Array renderBranchRegions(ArrayRef<coverage::CountedRegion> Regions) {
   json::Array RegionArray;
   for (const auto &Region : Regions)
-    if (!Region.Folded)
+    if (!Region.TrueFolded || !Region.FalseFolded)
----------------
chapuni wrote:

I thought it would be less valuable, since it looks like `CountedRegion` is rather naked. It's clear for me. (Personally I prefer `!(TrueFolded && FalseFolded)` than DeMorganized)

That said, I can introduce `isBothFolded()`. I hope we wouldn't provide also `isTrueFolded()` and `isFalseFolded()`.

https://github.com/llvm/llvm-project/pull/112694


More information about the cfe-commits mailing list