Skip to content

Commit e465f4c

Browse files
authored
Merge pull request github#2064 from jbj/leapyear-extends-abstract
C++: Avoid `extends Operation` in LeapYear.qll
2 parents 273ef46 + 34b6259 commit e465f4c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ private predicate additionalLogicalCheck(Expr e, string operation, int valueToCh
3030
/**
3131
* An `Operation` that seems to be checking for leap year.
3232
*/
33-
class CheckForLeapYearOperation extends Operation {
33+
class CheckForLeapYearOperation extends Expr {
3434
CheckForLeapYearOperation() {
3535
exists(BinaryArithmeticOperation bo | bo = this |
3636
bo.getAnOperand().getValue().toInt() = 4 and
@@ -39,8 +39,6 @@ class CheckForLeapYearOperation extends Operation {
3939
additionalLogicalCheck(this.getEnclosingElement(), "%", 400)
4040
)
4141
}
42-
43-
override string getOperator() { result = "LeapYearCheck" }
4442
}
4543

4644
/**

0 commit comments

Comments
 (0)