llvm-project
2b37ea40 - [MC/DC] Refactor MCDCCoverageBuilder. NFC.

Commit
279 days ago
[MC/DC] Refactor MCDCCoverageBuilder. NFC. - Get rid of the old `DecisionStack` and dissolve it into push/pop `CurCondIDs` in `VisitBin`, since `VisitBin` is recursive. - Introduce the new `DecisionStack` with `DecisionState` to handle the current `Decision` in nested `Decision`s. - The stack has the sentinel that has `DecisionExpr = nullptr`. - Split out `checkDecisionRootOrPush` from `pushAndAssignIDs` for non-BinOp. It assigns `CondID` to `E` (instead of assignment LHS in `pushAndAssignIDs`). - The stack is manupilated at the top Decision operator in `VisitBin`. - The stack grows at the entrance of the Decision with the initial state. - In the same level in `VisitBin`, the stack is popped and the `Decision` record is emitted. - Introduce `DecisionEndToSince` to sweep `MCDCBranch`es partially in `cancelDecision`.
Author
Parents
Loading