Skip to content

Commit 0f11ca1

Browse files
committed
unified: Exclude calls in pattern context
This fixes a data flow consistency error due to ArgumentNodes for constructor patterns missing their PostUpdateNode.
1 parent a916e8b commit 0f11ca1

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

unified/ql/lib/codeql/unified/internal/dataflow/DataFlowCall.qll

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
private import unified
22
private import AllDataFlow
3+
private import codeql.unified.internal.ExprPositions
34

4-
private newtype TDataFlowCall = TExplicitCall(CallExpr call)
5+
private newtype TDataFlowCall =
6+
TExplicitCall(CallExpr call) {
7+
not isInBindingContext(call, _) // ignore constructor patterns
8+
}
59

610
/**
711
* A call site, covering both explicit calls such as `foo(1,2)`, as well an implicit

0 commit comments

Comments
 (0)