We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 233ff08 commit 438cc5fCopy full SHA for 438cc5f
cpp/ql/lib/semmle/code/cpp/rangeanalysis/SimpleRangeAnalysis.qll
@@ -755,7 +755,8 @@ private module BoundsEstimate {
755
exists(RangeSsaDefinition def, StackVariable v |
756
e = def.getAUse(v) and
757
result = nrOfBoundsDef(def, v) and
758
- not exists(getValue(e).toFloat()) // Why?
+ // Avoid returning two numbers when `e` is a use with a constant value.
759
+ not exists(getValue(e).toFloat())
760
)
761
or
762
e instanceof UnsignedBitwiseAndExpr and
0 commit comments