Skip to content

Commit 6c95109

Browse files
committed
Overapproximate CapturedVariablesArgumentNode
We just create one for each call, not just the ones that capture variables. Of course, this causes a _lot_ of nodes to be instances of `CapturedVariablesArgumentNode`, which made the override of `toString` problematic, so that was removed as well.
1 parent a116463 commit 6c95109

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

python/ql/lib/semmle/python/dataflow/new/internal/DataFlowDispatch.qll

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1725,14 +1725,7 @@ private class SummaryPostUpdateNode extends FlowSummaryNode, PostUpdateNodeImpl
17251725
class CapturedVariablesArgumentNode extends CfgNode {
17261726
CallNode callNode;
17271727

1728-
CapturedVariablesArgumentNode() {
1729-
node = callNode.getFunction() and
1730-
exists(Function target | resolveCall(callNode, target, _) |
1731-
target = any(VariableCapture::CapturedVariable v).getACapturingScope()
1732-
)
1733-
}
1734-
1735-
override string toString() { result = "Capturing closure argument" }
1728+
CapturedVariablesArgumentNode() { node = callNode.getFunction() }
17361729
}
17371730

17381731
class CapturedVariablesArgumentNodeAsArgumentNode extends CapturedVariablesArgumentNode,

0 commit comments

Comments
 (0)