================ @@ -746,21 +781,52 @@ struct MCDCCoverageBuilder { // assign that ID to its LHS node. Its RHS will receive a new ID. if (CondIDs.contains(CodeGenFunction::stripCond(E))) { // If Stmt has an ID, assign its ID to LHS - CondIDs[CodeGenFunction::stripCond(E->getLHS())] = CondIDs[E]; + setCondID(E->getLHS(), getCondID(E)); // Since the operator's LHS assumes the operator's same ID, pop the // operator from the RHS stack so that if LHS short-circuits, it won't be // incorrectly re-used as the node executed next. popRHSifTop(E); } else { // Otherwise, assign ID+1 to LHS. - CondIDs[CodeGenFunction::stripCond(E->getLHS())] = NextID++; + setCondID(E->getLHS(), NextID++); } // Assign ID+1 to RHS. - CondIDs[CodeGenFunction::stripCond(E->getRHS())] = NextID++; + setCondID(E->getRHS(), NextID++); + + // Assign the True and False condition IDs for the LHS and RHS. + if (isLAnd(E)) { ---------------- ornata wrote:
I feel like it'd be easier to follow this if it was factored out into two functions. E.g. ``` if (isLAnd(E)) assignCondIDsForLAnd(E); else assignCondIDsForLOr(E); pushRHS(E); ``` https://github.com/llvm/llvm-project/pull/78202 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits