[libcxx-commits] [PATCH] D121216: [libc++] Enable modernize-loop-convert

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Mar 18 12:34:26 PDT 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rG01df675191de: [libc++] Enable modernize-loop-convert (authored by philnik).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121216

Files:
  libcxx/.clang-tidy
  libcxx/include/locale


Index: libcxx/include/locale
===================================================================
--- libcxx/include/locale
+++ libcxx/include/locale
@@ -3221,9 +3221,9 @@
                               int __fd)
 {
     __me = __mb;
-    for (unsigned __p = 0; __p < 4; ++__p)
+    for (char __p : __pat.field)
     {
-        switch (__pat.field[__p])
+        switch (__p)
         {
         case money_base::none:
             __mi = __me;
Index: libcxx/.clang-tidy
===================================================================
--- libcxx/.clang-tidy
+++ libcxx/.clang-tidy
@@ -10,6 +10,7 @@
 
   -misc-unconventional-assign-operator,
 
+  modernize-loop-convert,
   modernize-redundant-void-arg,
 
   readability-duplicate-include,
@@ -33,7 +34,6 @@
 # bugprone-branch-clone,
 # bugprone-macro-parentheses,
 # cppcoreguidelines-prefer-member-initializer,
-# modernize-loop-convert,
 # modernize-use-bool-literals,
 # modernize-use-default-member-init,
 # modernize-use-equals-default,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121216.416575.patch
Type: text/x-patch
Size: 996 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220318/085f52f0/attachment.bin>


More information about the libcxx-commits mailing list