diff --git a/Cython/Compiler/ParseTreeTransforms.py b/Cython/Compiler/ParseTreeTransforms.py index 982c18a68f9fb27490db2ff0fbda85860c76c12f..43fe2d0f90cbb199a2f0ab090eead4cba8e930d7 100644 --- a/Cython/Compiler/ParseTreeTransforms.py +++ b/Cython/Compiler/ParseTreeTransforms.py @@ -131,9 +131,9 @@ class NormalizeTree(CythonTransform): def visit_ExprStatNode(self, node): """Eliminate useless string literals""" if node.expr.is_string_literal: - return None - self.visitchildren(node) - return node + return self.visit_PassStatNode(node) + else: + return self.visit_StatNode(node) def visit_CDeclaratorNode(self, node): return node