Skip to content

Commit c88d686

Browse files
committed
Python: move SynthCapturePostUpdateNode
next to `SynthCaptureNode`
1 parent d6544cc commit c88d686

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

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

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1626,17 +1626,6 @@ private class SummaryPostUpdateNode extends FlowSummaryNode, PostUpdateNodeImpl
16261626
override Node getPreUpdateNode() { result = pre }
16271627
}
16281628

1629-
private class SynthCapturePostUpdateNode extends PostUpdateNodeImpl, SynthCaptureNode {
1630-
private SynthCaptureNode pre;
1631-
1632-
SynthCapturePostUpdateNode() {
1633-
VariableCapture::Flow::capturePostUpdateNode(this.getSynthesizedCaptureNode(),
1634-
pre.getSynthesizedCaptureNode())
1635-
}
1636-
1637-
override Node getPreUpdateNode() { result = pre }
1638-
}
1639-
16401629
/**
16411630
* The value of a closure itself being passed to the funciton, viewed as a node in a data
16421631
* flow graph.

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,17 @@ class SynthCaptureNode extends Node, TSynthCaptureNode {
498498
override string toString() { result = cn.toString() }
499499
}
500500

501+
private class SynthCapturePostUpdateNode extends PostUpdateNodeImpl, SynthCaptureNode {
502+
private SynthCaptureNode pre;
503+
504+
SynthCapturePostUpdateNode() {
505+
VariableCapture::Flow::capturePostUpdateNode(this.getSynthesizedCaptureNode(),
506+
pre.getSynthesizedCaptureNode())
507+
}
508+
509+
override Node getPreUpdateNode() { result = pre }
510+
}
511+
501512
/**
502513
* Gets a node that controls whether other nodes are evaluated.
503514
*

0 commit comments

Comments
 (0)