inline basicFlowStep into flowStep

This commit is contained in:
Erik Krogh Kristensen
2020-05-07 14:49:12 +02:00
parent 87167900d1
commit f8de69156e

View File

@@ -726,21 +726,6 @@ private predicate basicFlowStepNoBarrier(
summary = PathSummary::return()
}
/**
* Holds if there is a flow step from `pred` to `succ` described by `summary`
* under configuration `cfg`.
*
* Summary steps through function calls are not taken into account.
*/
private predicate basicFlowStep(
DataFlow::Node pred, DataFlow::Node succ, PathSummary summary, DataFlow::Configuration cfg
) {
basicFlowStepNoBarrier(pred, succ, summary, cfg) and
isRelevant(pred, cfg) and
not isLabeledBarrierEdge(cfg, pred, succ, summary.getStartLabel()) and
not isBarrierEdge(cfg, pred, succ)
}
/**
* Holds if there is a flow step from `pred` to `succ` under configuration `cfg`,
* including both basic flow steps and steps into/out of properties.
@@ -1339,7 +1324,8 @@ private predicate flowStep(
DataFlow::Node pred, DataFlow::Configuration cfg, DataFlow::Node succ, PathSummary summary
) {
(
basicFlowStep(pred, succ, summary, cfg)
basicFlowStepNoBarrier(pred, succ, summary, cfg) and
isRelevant(pred, cfg)
or
// Flow through a function that returns a value that depends on one of its arguments
// or a captured variable