Skip to content

Commit 15daa51

Browse files
committed
Shared: Address review comments and QL4QL alerts.
1 parent a23e77c commit 15daa51

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

shared/dataflow/codeql/dataflow/VariableCapture.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ module Flow<InputSig Input> implements OutputSig<Input> {
166166
exists(Call call | c1 = call.getEnclosingCallable() and c2 = getACallTarget(call))
167167
}
168168

169-
private predicate noCallGraph() { not exists(Call call, Callable c | c = getACallTarget(call)) }
169+
private predicate noCallGraph() { not exists(getACallTarget(_)) }
170170

171171
private predicate readOrWrite(BasicBlock bb, int i) {
172172
variableRead(bb, i, _, _) or variableWrite(bb, i, _, _)
@@ -219,7 +219,7 @@ module Flow<InputSig Input> implements OutputSig<Input> {
219219
private predicate hasHeapArg(Call call) {
220220
capturedVarsAreLive(call.getEnclosingCallable()) and capturedVarsAreLive(getACallTarget(call))
221221
or
222-
noCallGraph()
222+
noCallGraph() and exists(call)
223223
}
224224

225225
/**

0 commit comments

Comments
 (0)