We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
ControlFlowNode::getAChild()
1 parent 01ce344 commit a40f0e0Copy full SHA for a40f0e0
python/ql/src/semmle/python/Flow.qll
@@ -402,14 +402,14 @@ class ControlFlowNode extends @py_flow_node {
402
}
403
404
ControlFlowNode getAChild() {
405
- result = this.getExprChild() and
406
- result.getBasicBlock().dominates(this.getBasicBlock())
+ result = this.getExprChild(this.getBasicBlock())
407
408
409
/* join-ordering helper for `getAChild() */
410
pragma [noinline]
411
- private ControlFlowNode getExprChild() {
+ private ControlFlowNode getExprChild(BasicBlock dom) {
412
this.getNode().(Expr).getAChildNode() = result.getNode() and
+ result.getBasicBlock().dominates(dom) and
413
not this instanceof UnaryExprNode
414
415
0 commit comments