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):
if self.flow.block:
for stat in node.stats:
self.visit(stat)
if not self.flow.block:
stat.is_terminator = True
break
self.visit(stat)
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