C++: Removing unnecessary post update node.

This commit is contained in:
REDMOND\brodes
2026-02-12 11:19:24 -05:00
parent febc82dc19
commit d1811bc1fe

View File

@@ -434,8 +434,7 @@ predicate yearAssignmentToCheckCommonSteps(DataFlow::Node node1, DataFlow::Node
node1.(YearFieldAssignmentNode).getYearFieldAccess().getQualifier() = node2.asExpr()
or
// Pass through any intermediate struct
exists(Assignment a, DataFlow::PostUpdateNode pun |
a.getLValue().(YearFieldAccess).getQualifier*() = pun.getPreUpdateNode().asExpr() and
exists(Assignment a |
a.getRValue() = node1.asExpr() and
node2.asExpr() = a.getLValue().(YearFieldAccess).getQualifier*()
)