Skip to content

Commit 321c2fa

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 45bff11 commit 321c2fa

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,10 @@ class IgnorablePointerOrCharArithmetic extends IgnorableOperation {
273273
*/
274274
predicate isOperationSourceCandidate(Expr e) {
275275
not e instanceof IgnorableOperation and
276-
not e.getEnclosingFunction() instanceof IgnorableFunction and
276+
exists(Function f |
277+
f = e.getEnclosingFunction() and
278+
not f instanceof IgnorableFunction
279+
)
277280
(
278281
e instanceof SubExpr
279282
or

0 commit comments

Comments
 (0)