Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -143,17 +143,22 @@ module ModificationOfParameterWithDefault {
}
}

private predicate directlyControlledUse(
DataFlow::GuardNode guard, Cfg::NameNode use, boolean branch
) {
guard != use and guard.controlsBlock(use.getBasicBlock(), branch)
}

/** Holds if `barrier` is a use guarded by a direct truthiness check on `branch`. */
private predicate directGuardedUse(DataFlow::ExprNode barrier, boolean branch) {
exists(
DataFlow::GuardNode guard, SsaImpl::EssaDefinition def, Cfg::NameNode checked,
Cfg::NameNode use
|
checked = guard and
directlyControlledUse(guard, use, branch) and
SsaImpl::AdjacentUses::useOfDef(def, checked) and
SsaImpl::AdjacentUses::useOfDef(def, use) and
checked != use and
guard.controlsBlock(use.getBasicBlock(), branch) and
barrier.asCfgNode() = use
)
}
Expand Down
Loading