[llvm] [Coverage] Rework Decision/Expansion/Branch (PR #78969)

NAKAMURA Takumi via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 23 00:28:13 PST 2024


================
@@ -445,11 +447,11 @@ class MCDCRecordProcessor {
     //   visualize where the condition is.
     // - Record whether the condition is constant folded so that we exclude it
     //   from being measured.
-    for (const auto &B : Branches) {
-      Map[B.MCDCParams.ID] = &B;
-      PosToID[I] = B.MCDCParams.ID - 1;
-      CondLoc[I] = B.startLoc();
-      Folded[I++] = (B.Count.isZero() && B.FalseCount.isZero());
+    for (const auto *B : Branches) {
+      Map[B->MCDCParams.ID] = B;
----------------
chapuni wrote:

This is in #78918.
I don't think `B` could be null, since `Branches` is pushed with only `Region&`.
Any other concerns?

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


More information about the llvm-commits mailing list