[clang] [llvm] [clang][CoverageMapping] Refactor when setting MC/DC True/False (PR #78202)
    Alan Phipps via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Jan 17 18:13:38 PST 2024
    
    
  
================
@@ -1018,13 +1011,15 @@ struct CounterCoverageMappingBuilder
     return (Cond->EvaluateAsInt(Result, CVM.getCodeGenModule().getContext()));
   }
 
+  using MCDCDecisionIDPair = MCDCCoverageBuilder::DecisionIDPair;
+
   /// Create a Branch Region around an instrumentable condition for coverage
   /// and add it to the function's SourceRegions.  A branch region tracks a
   /// "True" counter and a "False" counter for boolean expressions that
   /// result in the generation of a branch.
-  void createBranchRegion(const Expr *C, Counter TrueCnt, Counter FalseCnt,
-                          MCDCConditionID ID = 0, MCDCConditionID TrueID = 0,
-                          MCDCConditionID FalseID = 0) {
+  void
+  createBranchRegion(const Expr *C, Counter TrueCnt, Counter FalseCnt,
+                     const MCDCDecisionIDPair &IDPair = MCDCDecisionIDPair()) {
----------------
evodius96 wrote:
I propose just leaving the initializers.
https://github.com/llvm/llvm-project/pull/78202
    
    
More information about the llvm-commits
mailing list