From 606e015afbfeab537a6eba76b0ab7b28a99cb21b Mon Sep 17 00:00:00 2001 From: Dave Bartolomeo Date: Wed, 16 Mar 2022 13:07:35 -0400 Subject: [PATCH] Update cpp/ql/lib/experimental/semmle/code/cpp/semantic/analysis/RangeAnalysis.qll Co-authored-by: Mathias Vorreiter Pedersen --- .../code/cpp/semantic/analysis/RangeAnalysis.qll | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/cpp/ql/lib/experimental/semmle/code/cpp/semantic/analysis/RangeAnalysis.qll b/cpp/ql/lib/experimental/semmle/code/cpp/semantic/analysis/RangeAnalysis.qll index 4d22931e4e2..684a17b58d5 100644 --- a/cpp/ql/lib/experimental/semmle/code/cpp/semantic/analysis/RangeAnalysis.qll +++ b/cpp/ql/lib/experimental/semmle/code/cpp/semantic/analysis/RangeAnalysis.qll @@ -421,12 +421,10 @@ private predicate boundFlowStep(SemExpr e2, SemExpr e1, int delta, boolean upper else none() ) or - exists(SemExpr x | - exists(SemSubExpr sub | - e2 = sub and - sub.getLeftOperand() = e1 and - sub.getRightOperand() = x - ) + exists(SemExpr x, SemSubExpr sub | + e2 = sub and + sub.getLeftOperand() = e1 and + sub.getRightOperand() = x | // `x instanceof ConstantIntegerExpr` is covered by valueFlowStep not x instanceof SemConstantIntegerExpr and