[PATCH] D23842: [CFG] Add iterator_ranges to CFG and CFGBlock.

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 24 10:20:22 PDT 2016


alexfh requested changes to this revision.
This revision now requires changes to proceed.

================
Comment at: include/clang/Analysis/CFG.h:526
@@ -524,1 +525,3 @@
   typedef AdjacentBlocks::const_reverse_iterator  const_pred_reverse_iterator;
+  typedef llvm::iterator_range<pred_iterator>                      pred_range;
+  typedef llvm::iterator_range<const_pred_iterator>          pred_const_range;
----------------
Most of the time the new functions will be used in a range-based for loop. I don't think the type returned by the functions will need to be explicitly specified anywhere. I'd remove the typedefs.


https://reviews.llvm.org/D23842





More information about the cfe-commits mailing list