diff --git a/java/ql/lib/semmle/code/java/ControlFlowGraph.qll b/java/ql/lib/semmle/code/java/ControlFlowGraph.qll index 7390be9cb3cf..c4f0c44b3813 100644 --- a/java/ql/lib/semmle/code/java/ControlFlowGraph.qll +++ b/java/ql/lib/semmle/code/java/ControlFlowGraph.qll @@ -406,7 +406,9 @@ private module NonReturningCalls { } /** Gets a `MethodCall` that calls this method. */ - MethodCall getAnAccess() { result.getMethod().getAPossibleImplementation() = this } + MethodCall getAnAccess() { + result.getMethod().getAPossibleImplementation() = pragma[only_bind_out](this) + } } /** Holds if a call to `m` indicates that `m` is expected to return. */