Skip to content

Commit 01df675

Browse files
committed
[libc++] Enable modernize-loop-convert
Reviewed By: ldionne, Mordante, #libc Spies: var-const, aheejin, libcxx-commits Differential Revision: https://reviews.llvm.org/D121216
1 parent 12ac339 commit 01df675

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

libcxx/.clang-tidy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Checks: >
1010
1111
-misc-unconventional-assign-operator,
1212
13+
modernize-loop-convert,
1314
modernize-redundant-void-arg,
1415
1516
readability-duplicate-include,
@@ -33,7 +34,6 @@ CheckOptions:
3334
# bugprone-branch-clone,
3435
# bugprone-macro-parentheses,
3536
# cppcoreguidelines-prefer-member-initializer,
36-
# modernize-loop-convert,
3737
# modernize-use-bool-literals,
3838
# modernize-use-default-member-init,
3939
# modernize-use-equals-default,

libcxx/include/locale

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3221,9 +3221,9 @@ __money_put<_CharT>::__format(char_type* __mb, char_type*& __mi, char_type*& __m
32213221
int __fd)
32223222
{
32233223
__me = __mb;
3224-
for (unsigned __p = 0; __p < 4; ++__p)
3224+
for (char __p : __pat.field)
32253225
{
3226-
switch (__pat.field[__p])
3226+
switch (__p)
32273227
{
32283228
case money_base::none:
32293229
__mi = __me;

0 commit comments

Comments
 (0)