[clang] [llvm] [clang][CoverageMapping] Refactor when setting MC/DC True/False (PR #78202)

Jessica Paquette via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 15 17:27:59 PST 2024


================
@@ -722,6 +739,24 @@ struct MCDCCoverageBuilder {
       return I->second;
   }
 
+  /// Return the ID of the next condition when the given condition is True.
+  MCDCConditionID getNextIfTrueCondID(const Expr *Cond) const {
+    auto I = TrueCondIDs.find(CodeGenFunction::stripCond(Cond));
+    if (I == TrueCondIDs.end())
+      return 0;
----------------
ornata wrote:

Should document that this returns 0 when the condition is not found.

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


More information about the cfe-commits mailing list