[PATCH] D131448: Introduce iterator sentinel to make graph traversal implementation more efficient and cleaner

Roman Rusyaev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 9 10:47:08 PDT 2022


rusyaev-roman added a comment.

In sum, this change brings the following improvements for all graph traversal iterators that are used in 'range-based for loop':

- avoid creating an empty iterator (that holds containers inside) to compare with the end iterator
- make 'empty()' call explicit (instead of comparing two containers of iterators) when an iterator is compared with the end iterator


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131448/new/

https://reviews.llvm.org/D131448



More information about the cfe-commits mailing list