Commit 2a0ee6a6 authored by Vitja Makarov's avatar Vitja Makarov

Mark node as terminator if no control-flow node

parent 96019a8d
......@@ -680,10 +680,12 @@ class CreateControlFlowGraph(CythonTransform):
return node
def visit_StatListNode(self, node):
for stat in node.stats:
if not self.flow.block:
break
self.visit(stat)
if self.flow.block:
for stat in node.stats:
self.visit(stat)
if not self.flow.block:
stat.is_terminator = True
break
return node
def visit_Node(self, node):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment