coverage: Restrict ExpressionUsed
simplification to Code
mappings
In the future, branch and MC/DC mappings might have expressions that don't correspond to any single point in the control-flow graph. That makes it trickier to keep track of which expressions should expect an `ExpressionUsed` node. We therefore sidestep that complexity by only performing `ExpressionUsed` simplification for expressions associated directly with ordinary `Code` mappings.
This commit is contained in:
parent
741ed01646
commit
d4f1f92426
4 changed files with 27 additions and 19 deletions
|
@ -159,6 +159,15 @@ impl ExtractedMappings {
|
|||
|
||||
bcbs_with_counter_mappings
|
||||
}
|
||||
|
||||
/// Returns the set of BCBs that have one or more `Code` mappings.
|
||||
pub(super) fn bcbs_with_ordinary_code_mappings(&self) -> BitSet<BasicCoverageBlock> {
|
||||
let mut bcbs = BitSet::new_empty(self.num_bcbs);
|
||||
for &CodeMapping { span: _, bcb } in &self.code_mappings {
|
||||
bcbs.insert(bcb);
|
||||
}
|
||||
bcbs
|
||||
}
|
||||
}
|
||||
|
||||
fn resolve_block_markers(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue