Convert all obvious node_begin/node_end and child_begin/child_end
pairs to range based for.
Sending for review in case someone has a good idea how to make
graph_children able to be inferred. It looks like it would require
changing GraphTraits to be two argument or something. I presume
inference does not happen because it would have to check every
GraphTraits in the world to see if the noderef types matched.
Note: This change was 3-staged with clang as well, which uses
Dominators/etc from LLVM.
Note that this use of const auto & is required to make clang build, as the iterator type it for CFG blocks ends up returning blocks directly otherwise here.
I'm not sure this is a legal definition of graphtraits, and the definition of CFG inverse graph traits is also definitely broken:
(the constant iterator is being used for the non-constant version of inverse graphtraits, which looks like a paste error)
I don't usually work in clang world, so i added someone who does :)