[PATCH] D78225: [MustExecute] checkForAllContext(): use pre-increment

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 15 14:20:23 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGf54dc12e46fa: [MustExecute] checkForAllContext(): use pre-increment (authored by lebedev.ri).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78225

Files:
  llvm/include/llvm/Analysis/MustExecute.h


Index: llvm/include/llvm/Analysis/MustExecute.h
===================================================================
--- llvm/include/llvm/Analysis/MustExecute.h
+++ llvm/include/llvm/Analysis/MustExecute.h
@@ -469,7 +469,7 @@
   /// true if \p Pred holds in every instruction.
   bool checkForAllContext(const Instruction *PP,
                           const function_ref<bool(const Instruction *)> &Pred) {
-    for (auto EIt = begin(PP), EEnd = end(PP); EIt != EEnd; EIt++)
+    for (auto EIt = begin(PP), EEnd = end(PP); EIt != EEnd; ++EIt)
       if (!Pred(*EIt))
         return false;
     return true;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78225.257846.patch
Type: text/x-patch
Size: 610 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200415/e1185ac3/attachment.bin>


More information about the llvm-commits mailing list