PSyclone
PSyclone copied to clipboard
Replace node.walk(Reference) with node.reference_acesses()
Oncee #2527, #2424, #2271 are fixed, we need to replace many:
for node in expr.walk(Reference)
with the reference_accesses
version because it currently misses all references that are not nodes in a tree (e.g. kinds) and it currently needs awkward ancestor checks (e.g. if (isinstance(ref.parent, Call) and ref is ref.parent.children[0])
) to see if it was a data symbol or some call or type symbol, which often we don't need.