Skip to content

Commit acca26f

Browse files
authored
Merge pull request #5992 from hvitved/java/is-unreachable-perf
Java: Improve performance of `isUnreachableInCall()`
2 parents 8e6dd51 + daf2cc3 commit acca26f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

java/ql/src/semmle/code/java/dataflow/internal/DataFlowPrivate.qll

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,9 @@ predicate isUnreachableInCall(Node n, DataFlowCall call) {
296296
// which is used in a guard
297297
param.getAUse() = guard and
298298
// which controls `n` with the opposite value of `arg`
299-
guard.controls(n.asExpr().getBasicBlock(), arg.getBooleanValue().booleanNot())
299+
guard
300+
.controls(n.asExpr().getBasicBlock(),
301+
pragma[only_bind_out](arg.getBooleanValue()).booleanNot())
300302
)
301303
}
302304

0 commit comments

Comments
 (0)