Skip to content

Commit 470c241

Browse files
author
Esben Sparre Andreasen
committed
JS: use range instead of ad hoc LT/GT
1 parent 1389009 commit 470c241

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

javascript/ql/src/Declarations/DeadStoreOfProperty.ql

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,10 @@ predicate noPropAccessBetween(string name, Assignment assign1, Assignment assign
9292
assign2.getBasicBlock() = block2 and
9393
if block1 = block2 then
9494
// same block: check for access between
95-
not exists (int i1, int iMid, Expr mid, int i2 |
95+
not exists (int i1, Expr mid, int i2 |
9696
assign1 = block1.getNode(i1) and
9797
assign2 = block2.getNode(i2) and
98-
i1 < iMid and iMid < i2 and
99-
mid = block1.getNode(iMid) and
98+
mid = block1.getNode([i1+1..i2-1]) and
10099
maybeAccessesProperty(mid, name)
101100
)
102101
else

0 commit comments

Comments
 (0)