Skip to content

Commit 1c81c9b

Browse files
authored
Merge pull request github#15262 from MathiasVP/fix-qldoc-on-cmpWithLinearBound
C++: Fix QLDoc on `cmpWithLinearBound`
2 parents 3224b5c + f5e1e49 commit 1c81c9b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -355,13 +355,13 @@ private predicate linearAccessImpl(Expr expr, VariableAccess v, float p, float q
355355
* `cmpWithLinearBound(guard, v, Greater(), true)` and
356356
* `cmpWithLinearBound(guard, v, Lesser(), false)` hold.
357357
* If `guard` is `4 - v > 5` then
358-
* `cmpWithLinearBound(guard, v, Lesser(), false)` and
359-
* `cmpWithLinearBound(guard, v, Greater(), true)` hold.
358+
* `cmpWithLinearBound(guard, v, Lesser(), true)` and
359+
* `cmpWithLinearBound(guard, v, Greater(), false)` hold.
360360
*
361-
* A more sophisticated predicate, such as `boundFromGuard`, is needed
362-
* to compute an actual bound for `v`. This predicate can be used if
363-
* you just want to check whether a variable is bounded, or to restrict
364-
* a more expensive analysis to just guards that bound a variable.
361+
* If an actual bound for `v` is needed, use `upperBound` or `lowerBound`.
362+
* This predicate can be used if you just want to check whether a variable
363+
* is bounded, or to restrict a more expensive analysis to just guards that
364+
* bound a variable.
365365
*/
366366
predicate cmpWithLinearBound(
367367
ComparisonOperation guard, VariableAccess v,

0 commit comments

Comments
 (0)