Skip to content

Commit 30e0781

Browse files
committed
C++: Also check for source calls when using 'lambda call resolution'.
1 parent 9ea4c40 commit 30e0781

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1328,7 +1328,10 @@ predicate lambdaCreation(Node creation, LambdaCallKind kind, DataFlowCallable c)
13281328

13291329
/** Holds if `call` is a lambda call of kind `kind` where `receiver` is the lambda expression. */
13301330
predicate lambdaCall(DataFlowCall call, LambdaCallKind kind, Node receiver) {
1331-
call.(SummaryCall).getReceiver() = receiver.(FlowSummaryNode).getSummaryNode() and
1331+
(
1332+
call.(SummaryCall).getReceiver() = receiver.(FlowSummaryNode).getSummaryNode() or
1333+
call.asCallInstruction().getCallTargetOperand() = receiver.asOperand()
1334+
) and
13321335
exists(kind)
13331336
}
13341337

0 commit comments

Comments
 (0)