[flang-commits] [PATCH] D86425: [flang][msvc] Avoid range-based for over initializer_list. NFC.

Michael Kruse via Phabricator via flang-commits flang-commits at lists.llvm.org
Tue Sep 8 22:22:50 PDT 2020


This revision was automatically updated to reflect the committed changes.
Meinersbur marked an inline comment as done.
Closed by commit rGc58dfbdc8182: [flang][msvc] Avoid range-based for over initializer_list. NFC. (authored by Meinersbur).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86425

Files:
  flang/include/flang/Common/enum-set.h


Index: flang/include/flang/Common/enum-set.h
===================================================================
--- flang/include/flang/Common/enum-set.h
+++ flang/include/flang/Common/enum-set.h
@@ -37,8 +37,8 @@
 
   constexpr EnumSet() {}
   constexpr EnumSet(const std::initializer_list<enumerationType> &enums) {
-    for (auto x : enums) {
-      set(x);
+    for (auto it{enums.begin()}; it != enums.end(); ++it) {
+      set(*it);
     }
   }
   constexpr EnumSet(const EnumSet &) = default;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86425.290639.patch
Type: text/x-patch
Size: 501 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20200909/f731e390/attachment.bin>


More information about the flang-commits mailing list