Skip to content

Commit 45bff11

Browse files
bdrodesMathiasVP
andauthored
Update cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
1 parent aab59f6 commit 45bff11

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,10 @@ class IgnorableExpr48Mapping extends IgnorableOperation {
123123
*/
124124
class IgnorableCharLiteralArithmetic extends IgnorableOperation {
125125
IgnorableCharLiteralArithmetic() {
126-
exists(this.(BinaryArithmeticOperation).getAnOperand().(TextLiteral).getValue())
126+
this.(BinaryArithmeticOperation).getAnOperand() instanceof TextLiteral
127127
or
128-
exists(AssignArithmeticOperation e | e.getRValue() = this |
129-
exists(this.(TextLiteral).getValue())
130-
)
128+
this instanceof TextLiteral and
129+
any(AssignArithmeticOperation arith).getRValue() = this
131130
}
132131
}
133132

0 commit comments

Comments
 (0)