Commit be6bd16a authored by Xavier Thompson's avatar Xavier Thompson

Fix invalid optimisation of for-loops over cpp iterables

parent 5f192afb
...@@ -221,6 +221,10 @@ class IterationTransform(Visitor.EnvTransform): ...@@ -221,6 +221,10 @@ class IterationTransform(Visitor.EnvTransform):
return node return node
return self._transform_set_iteration(node, iterable) return self._transform_set_iteration(node, iterable)
# C++ iteration?
if iterable.type.is_cpp_class:
return node
# C array (slice) iteration? # C array (slice) iteration?
if iterable.type.is_ptr or iterable.type.is_array: if iterable.type.is_ptr or iterable.type.is_array:
return self._transform_carray_iteration(node, iterable, reversed=reversed) return self._transform_carray_iteration(node, iterable, reversed=reversed)
......
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