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

Alan Phipps via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 15 10:51:47 PST 2024


================
@@ -668,6 +668,8 @@ struct MCDCCoverageBuilder {
   llvm::SmallVector<const BinaryOperator *> NestLevel;
   llvm::DenseMap<const Stmt *, MCDCConditionID> &CondIDs;
   llvm::DenseMap<const Stmt *, unsigned> &MCDCBitmapMap;
+  llvm::DenseMap<const Stmt *, MCDCConditionID> TrueCondIDs;
----------------
evodius96 wrote:

We can use these to track a Condition's True/False IDs and make all of this self-contained within MCDCBuilder rather than calculating it in the visitor routines. Much cleaner.

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


More information about the cfe-commits mailing list