[libcxx-commits] [libcxxabi] [llvm] [libc++abi][NFC] Enable modernize-loop-convert clang-tidy check (PR #213250)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jul 31 04:33:43 PDT 2026
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/213250
None
>From 36698d0720abaef1e93602eaba83e9b341f7f4f8 Mon Sep 17 00:00:00 2001
From: Nikolas Klauser <nikolasklauser at berlin.de>
Date: Fri, 31 Jul 2026 13:33:19 +0200
Subject: [PATCH] [libc++abi][NFC] Enable modernize-loop-convert clang-tidy
check
---
libcxxabi/.clang-tidy | 2 +-
libcxxabi/src/demangle/ItaniumDemangle.h | 4 ++--
llvm/include/llvm/Demangle/ItaniumDemangle.h | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/libcxxabi/.clang-tidy b/libcxxabi/.clang-tidy
index cbb2351419896..6b9911d8d8254 100644
--- a/libcxxabi/.clang-tidy
+++ b/libcxxabi/.clang-tidy
@@ -10,6 +10,7 @@ Checks: >
misc-non-copyable-objects,
misc-uniqueptr-reset-release,
+ modernize-loop-convert,
modernize-redundant-void-arg,
readability-duplicate-include,
@@ -47,7 +48,6 @@ CheckOptions:
# TODO: Enable these checks
# llvm-include-order,
# llvm-namespace-comment,
-# modernize-loop-convert,
# modernize-use-equals-delete,
# modernize-use-nullptr,
# modernize-use-override,
diff --git a/libcxxabi/src/demangle/ItaniumDemangle.h b/libcxxabi/src/demangle/ItaniumDemangle.h
index 94d780e229631..2ae943e1998f1 100644
--- a/libcxxabi/src/demangle/ItaniumDemangle.h
+++ b/libcxxabi/src/demangle/ItaniumDemangle.h
@@ -2858,8 +2858,8 @@ template <typename Derived, typename Alloc> struct AbstractManglingParser {
ParsingLambdaParamsAtLevel = (size_t)-1;
TryToParseTemplateArgs = true;
PermitForwardTemplateReferences = false;
- for (int I = 0; I != 3; ++I)
- NumSyntheticTemplateParameters[I] = 0;
+ for (unsigned int & NumSyntheticTemplateParameter : NumSyntheticTemplateParameters)
+ NumSyntheticTemplateParameter = 0;
ASTAllocator.reset();
}
diff --git a/llvm/include/llvm/Demangle/ItaniumDemangle.h b/llvm/include/llvm/Demangle/ItaniumDemangle.h
index 04338e1d7cb51..0f1deb3d710e2 100644
--- a/llvm/include/llvm/Demangle/ItaniumDemangle.h
+++ b/llvm/include/llvm/Demangle/ItaniumDemangle.h
@@ -2858,8 +2858,8 @@ template <typename Derived, typename Alloc> struct AbstractManglingParser {
ParsingLambdaParamsAtLevel = (size_t)-1;
TryToParseTemplateArgs = true;
PermitForwardTemplateReferences = false;
- for (int I = 0; I != 3; ++I)
- NumSyntheticTemplateParameters[I] = 0;
+ for (unsigned int & NumSyntheticTemplateParameter : NumSyntheticTemplateParameters)
+ NumSyntheticTemplateParameter = 0;
ASTAllocator.reset();
}
More information about the libcxx-commits
mailing list