Skip to content

Commit ca9f66c

Browse files
committed
Misc. updates. Removed the ignorable function mechanic, and switched to a more precise ignorable operation analysis. Ignorable operations that flow to a possible source also invalidate that source. Also added a root source finder to get the earliest source if many exist. Modified the leap year checker finder to use a new dataflow mechanic that flows from a YearFieldAccess.
1 parent 50e182e commit ca9f66c

2 files changed

Lines changed: 146 additions & 179 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Expr moduloCheckNEQ_0(NEExpr neq, int modVal) {
6464
* Returns if the two expressions resolve to the same value, albeit it is a fuzzy attempt.
6565
* SSA is not fit for purpose here as calls break SSA equivalence.
6666
*/
67-
bindingset[e1,e2]
67+
bindingset[e1, e2]
6868
pragma[inline_late]
6969
predicate exprEq_propertyPermissive(Expr e1, Expr e2) {
7070
not e1 = e2 and
@@ -395,7 +395,7 @@ class ChecksForLeapYearFunctionCall extends FunctionCall {
395395
}
396396

397397
/**
398-
* A `DataFlow` configuraiton for finding a variable access that would flow into
398+
* A `DataFlow` configuration for finding a variable access that would flow into
399399
* a function call that includes an operation to check for leap year.
400400
*/
401401
private module LeapYearCheckFlowConfig implements DataFlow::ConfigSig {

0 commit comments

Comments
 (0)