Ruby: local dataflow step for || and &&

This commit is contained in:
Arthur Baars
2022-09-26 16:52:23 +02:00
parent e95b5468d9
commit 09bc78eafc
7 changed files with 236 additions and 4 deletions

View File

@@ -181,6 +181,12 @@ module LocalFlow {
) and
nodeFrom.asExpr() = for.getValue()
)
or
nodeTo.asExpr() =
any(CfgNodes::ExprNodes::BinaryOperationCfgNode op |
op.getExpr() instanceof BinaryLogicalOperation and
nodeFrom.asExpr() = op.getAPredecessor()
)
}
}