File tree Expand file tree Collapse file tree
cpp/ql/src/Likely Bugs/Leap Year Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,6 +21,18 @@ class IgnorableFunction extends Function {
2121 IgnorableFunction ( ) {
2222 // Helper utility in postgres with string time conversions
2323 this .getName ( ) = "DecodeISO8601Interval"
24+ or
25+ // helper utility for date conversions in qtbase
26+ this .getName ( ) = "adjacentDay"
27+ or
28+ // Windows API function that does timezone conversions
29+ this .getName ( ) .matches ( "%SystemTimeToTzSpecificLocalTime%" )
30+ or
31+ // Windows APIs that do time conversions
32+ this .getName ( ) .matches ( "%localtime%\\_s%" )
33+ or
34+ // Windows APIs that do time conversions
35+ this .getName ( ) .matches ( "%SpecificLocalTimeToSystemTime%" )
2436 }
2537}
2638
@@ -74,6 +86,8 @@ class IgnorableCharLiteralArithmetic extends IgnorableOperation {
7486bindingset [ c]
7587predicate isLikelyConversionConstant ( int c ) {
7688 exists ( int i | i = c .abs ( ) | i >= 100 )
89+ or
90+ c = 0
7791 // c = 146097 or // days in 400-year Gregorian cycle
7892 // c = 36524 or // days in 100-year Gregorian subcycle
7993 // c = 1461 or // days in 4-year cycle (incl. 1 leap)
You can’t perform that action at this time.
0 commit comments