Skip to content

Commit 233ff08

Browse files
committed
C++: Add number of bounds test to simple range analysis
1 parent 1a9a40c commit 233ff08

File tree

3 files changed

+4580
-0
lines changed

3 files changed

+4580
-0
lines changed

cpp/ql/lib/semmle/code/cpp/rangeanalysis/SimpleRangeAnalysis.qll

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2135,4 +2135,7 @@ module SimpleRangeAnalysisInternal {
21352135
// bound is `typeUpperBound`.
21362136
defMightOverflowNegatively(def, v) and result = varMaxVal(v)
21372137
}
2138+
2139+
/** Gets the estimate of the number of bounds for `e`. */
2140+
float estimateNrOfBounds(Expr e) { result = BoundsEstimate::nrOfBoundsExpr(e) }
21382141
}

0 commit comments

Comments
 (0)