Skip to content

Commit f22c91b

Browse files
Dave BartolomeoMathiasVP
andauthored
Update cpp/ql/lib/experimental/semmle/code/cpp/semantic/analysis/RangeUtils.qll
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
1 parent c8a0a86 commit f22c91b

File tree

1 file changed

+4
-6
lines changed
  • cpp/ql/lib/experimental/semmle/code/cpp/semantic/analysis

1 file changed

+4
-6
lines changed

cpp/ql/lib/experimental/semmle/code/cpp/semantic/analysis/RangeUtils.qll

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,10 @@ predicate semValueFlowStep(SemExpr e2, SemExpr e1, int delta) {
101101
x.(SemConstantIntegerExpr).getIntValue() = delta
102102
)
103103
or
104-
exists(SemExpr x |
105-
exists(SemSubExpr sub |
106-
e2 = sub and
107-
sub.getLeftOperand() = e1 and
108-
sub.getRightOperand() = x
109-
)
104+
exists(SemExpr x, SemSubExpr sub |
105+
e2 = sub and
106+
sub.getLeftOperand() = e1 and
107+
sub.getRightOperand() = x
110108
|
111109
x.(SemConstantIntegerExpr).getIntValue() = -delta
112110
)

0 commit comments

Comments
 (0)