Skip to content

Commit d1811bc

Browse files
committed
C++: Removing unnecessary post update node.
1 parent febc82d commit d1811bc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,8 +434,7 @@ predicate yearAssignmentToCheckCommonSteps(DataFlow::Node node1, DataFlow::Node
434434
node1.(YearFieldAssignmentNode).getYearFieldAccess().getQualifier() = node2.asExpr()
435435
or
436436
// Pass through any intermediate struct
437-
exists(Assignment a, DataFlow::PostUpdateNode pun |
438-
a.getLValue().(YearFieldAccess).getQualifier*() = pun.getPreUpdateNode().asExpr() and
437+
exists(Assignment a |
439438
a.getRValue() = node1.asExpr() and
440439
node2.asExpr() = a.getLValue().(YearFieldAccess).getQualifier*()
441440
)

0 commit comments

Comments
 (0)