Ruby: Support postupdate notes for assignment expressions.

This commit is contained in:
Michael Nebel
2022-09-29 13:55:52 +02:00
parent af4db77046
commit 999eb19c3d

View File

@@ -52,6 +52,8 @@ private CfgNodes::ExprCfgNode getALastEvalNode(CfgNodes::ExprCfgNode n) {
or
result = n.(CfgNodes::ExprNodes::ConditionalExprCfgNode).getBranch(_)
or
result = n.(CfgNodes::ExprNodes::AssignExprCfgNode).getRhs()
or
exists(CfgNodes::AstCfgNode branch |
branch = n.(CfgNodes::ExprNodes::CaseExprCfgNode).getBranch(_)
|
@@ -157,8 +159,6 @@ module LocalFlow {
predicate localFlowStepCommon(Node nodeFrom, Node nodeTo) {
localSsaFlowStep(nodeFrom, nodeTo)
or
nodeFrom.asExpr() = nodeTo.asExpr().(CfgNodes::ExprNodes::AssignExprCfgNode).getRhs()
or
nodeFrom.asExpr() = nodeTo.asExpr().(CfgNodes::ExprNodes::BlockArgumentCfgNode).getValue()
or
nodeFrom.asExpr() = getALastEvalNode(nodeTo.asExpr())