Python: Fix bad join ordering in `ControlFlowNode::getAChild()`.

This commit is contained in:
Taus Brock-Nannestad 2019-07-02 15:42:41 +02:00
Родитель 01ce34449d
Коммит a40f0e0d14
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -402,14 +402,14 @@ class ControlFlowNode extends @py_flow_node {
}
ControlFlowNode getAChild() {
result = this.getExprChild() and
result.getBasicBlock().dominates(this.getBasicBlock())
result = this.getExprChild(this.getBasicBlock())
}
/* join-ordering helper for `getAChild() */
pragma [noinline]
private ControlFlowNode getExprChild() {
private ControlFlowNode getExprChild(BasicBlock dom) {
this.getNode().(Expr).getAChildNode() = result.getNode() and
result.getBasicBlock().dominates(dom) and
not this instanceof UnaryExprNode
}