Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit db6e290

Browse files
committed
CPP: Simplify to 'CrementOperation'.
1 parent 51caee6 commit db6e290

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

cpp/ql/src/Likely Bugs/Leap Year/LeapYear.qll

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ abstract class LeapYearFieldAccess extends YearFieldAccess {
5959
(
6060
op instanceof AssignArithmeticOperation or
6161
exists(BinaryArithmeticOperation bao | bao = op.getAnOperand()) or
62-
op instanceof PostfixCrementOperation or
63-
op instanceof PrefixCrementOperation
62+
op instanceof CrementOperation
6463
)
6564
)
6665
}
@@ -117,9 +116,7 @@ abstract class LeapYearFieldAccess extends YearFieldAccess {
117116
)
118117
)
119118
or
120-
op instanceof PostfixCrementOperation
121-
or
122-
op instanceof PrefixCrementOperation
119+
op instanceof CrementOperation
123120
)
124121
)
125122
}

0 commit comments

Comments
 (0)