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): ...@@ -680,10 +680,12 @@ class CreateControlFlowGraph(CythonTransform):
return node return node
def visit_StatListNode(self, node): def visit_StatListNode(self, node):
for stat in node.stats: if self.flow.block:
if not self.flow.block: for stat in node.stats:
break self.visit(stat)
self.visit(stat) if not self.flow.block:
stat.is_terminator = True
break
return node return node
def visit_Node(self, 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