sequence: better collect sequence-related addresses from Range statements

This commit is contained in:
Willi Ballenthin
2025-01-16 15:42:48 +00:00
committed by Willi Ballenthin
parent f55086c212
commit e6bdcff5d9

View File

@@ -328,6 +328,13 @@ def collect_sequence_locations(
child_mode = MODE_FAILURE if mode == MODE_SUCCESS else MODE_SUCCESS child_mode = MODE_FAILURE if mode == MODE_SUCCESS else MODE_SUCCESS
for child in match.children: for child in match.children:
yield from collect_sequence_locations(child, child_mode) yield from collect_sequence_locations(child, child_mode)
elif isinstance(match.node.statement, rd.RangeStatement):
for location in match.locations:
if location.type not in (frz.AddressType.CALL, ):
continue
if mode == MODE_FAILURE:
continue
yield location
else: else:
for child in match.children: for child in match.children:
yield from collect_sequence_locations(child, mode) yield from collect_sequence_locations(child, mode)