use getImmediatePredecessor instead of getALocalSource()

This commit is contained in:
Erik Krogh Kristensen
2020-05-29 13:01:09 +02:00
parent 5bb308dc8f
commit 05bfba4f99

View File

@@ -438,7 +438,7 @@ private predicate barrierGuardBlocksNode(BarrierGuardNode guard, DataFlow::Node
barrierGuardIsRelevant(guard) and
exists(AccessPath p, BasicBlock bb, ConditionGuardNode cond, boolean outcome |
nd = DataFlow::valueNode(p.getAnInstanceIn(bb)) and
(guard.getEnclosingExpr() = cond.getTest() or guard = cond.getTest().flow().getALocalSource()) and
(guard.getEnclosingExpr() = cond.getTest() or guard = cond.getTest().flow().getImmediatePredecessor+()) and
outcome = cond.getOutcome() and
barrierGuardBlocksAccessPath(guard, outcome, p, label) and
cond.dominates(bb)