[clang] [clang][NFC] Use range-based for loop and algorithms in `SemaDeclCXX.cpp` (PR #169938)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 1 05:25:50 PST 2025
================
@@ -5675,8 +5670,7 @@ static void DiagnoseBaseOrMemInitializerOrder(
// Don't check initializers order unless the warning is enabled at the
// location of at least one initializer.
bool ShouldCheckOrder = false;
- for (unsigned InitIndex = 0; InitIndex != Inits.size(); ++InitIndex) {
- CXXCtorInitializer *Init = Inits[InitIndex];
+ for (CXXCtorInitializer *Init : Inits) {
----------------
tbaederr wrote:
`Init` can be `const`.
https://github.com/llvm/llvm-project/pull/169938
More information about the cfe-commits
mailing list