File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
cpp/ql/src/Likely Bugs/Leap Year Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -194,14 +194,21 @@ class StructTmLeapYearFieldAccess extends LeapYearFieldAccess {
194194 }
195195}
196196
197+ /**
198+ * `Function` that includes an operation that is checking for leap year.
199+ */
200+ class ChecksForLeapYearFunction extends Function {
201+ ChecksForLeapYearFunction ( ) {
202+ this = any ( CheckForLeapYearOperation clyo ) .getEnclosingFunction ( )
203+ }
204+ }
205+
197206/**
198207 * `FunctionCall` that includes an operation that is checking for leap year.
199208 */
200209class ChecksForLeapYearFunctionCall extends FunctionCall {
201210 ChecksForLeapYearFunctionCall ( ) {
202- exists ( Function f , CheckForLeapYearOperation clyo | f .getACallToThisFunction ( ) = this |
203- clyo .getEnclosingFunction ( ) = f
204- )
211+ this .getTarget ( ) instanceof ChecksForLeapYearFunction
205212 }
206213}
207214
You can’t perform that action at this time.
0 commit comments