[libcxxabi] [llvm] [libc++abi][NFC] Enable modernize-loop-convert clang-tidy check (PR #213250)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 4 01:48:34 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxxabi
Author: Nikolas Klauser (philnik777)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/213250.diff
3 Files Affected:
- (modified) libcxxabi/.clang-tidy (+1-1)
- (modified) libcxxabi/src/demangle/ItaniumDemangle.h (+2-2)
- (modified) llvm/include/llvm/Demangle/ItaniumDemangle.h (+2-2)
``````````diff
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();
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/213250
More information about the llvm-commits
mailing list