Skip to content

Commit cd7ba7c

Browse files
committed
C++: Fix join orders in 'eqBound'.
1 parent 0c6b60b commit cd7ba7c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -328,10 +328,11 @@ module SignAnalysis<DeltaSig D, UtilSig<D> Utils> {
328328
* - `isEq = false` : `v != eqbound`
329329
*/
330330
private predicate eqBound(SemExpr eqbound, SemSsaVariable v, SemSsaReadPosition pos, boolean isEq) {
331-
exists(SemGuard guard, boolean testIsTrue, boolean polarity |
332-
pos.hasReadOfVar(v) and
333-
semGuardControlsSsaRead(guard, pos, testIsTrue) and
334-
guard.isEquality(eqbound, Utils::semSsaRead(v, D::fromInt(0)), polarity) and
331+
exists(SemGuard guard, boolean testIsTrue, boolean polarity, SemExpr e |
332+
pos.hasReadOfVar(pragma[only_bind_into](v)) and
333+
semGuardControlsSsaRead(guard, pragma[only_bind_into](pos), testIsTrue) and
334+
e = Utils::semSsaRead(pragma[only_bind_into](v), D::fromInt(0)) and
335+
guard.isEquality(eqbound, e, polarity) and
335336
isEq = polarity.booleanXor(testIsTrue).booleanNot() and
336337
not unknownSign(eqbound)
337338
)

0 commit comments

Comments
 (0)