Skip to content

Conversation

@kazutakahirata
Copy link
Contributor

Identified with modernize-loop-convert.

Identified with modernize-loop-convert.
@llvmbot
Copy link
Member

llvmbot commented Nov 21, 2025

@llvm/pr-subscribers-llvm-support

Author: Kazu Hirata (kazutakahirata)

Changes

Identified with modernize-loop-convert.


Full diff: https://github.com/llvm/llvm-project/pull/169001.diff

1 Files Affected:

  • (modified) llvm/lib/Support/CommandLine.cpp (+2-4)
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp
index dab8beeff7ca5..26e14dec228e1 100644
--- a/llvm/lib/Support/CommandLine.cpp
+++ b/llvm/lib/Support/CommandLine.cpp
@@ -602,10 +602,8 @@ static Option *LookupNearestOption(StringRef Arg,
   // Find the closest match.
   Option *Best = nullptr;
   unsigned BestDistance = 0;
-  for (StringMap<Option *>::const_iterator it = OptionsMap.begin(),
-                                           ie = OptionsMap.end();
-       it != ie; ++it) {
-    Option *O = it->second;
+  for (const auto &Opt : OptionsMap) {
+    Option *O = Opt.second;
     // Do not suggest really hidden options (not shown in any help).
     if (O->getOptionHiddenFlag() == ReallyHidden)
       continue;

@github-actions
Copy link

github-actions bot commented Nov 21, 2025

🐧 Linux x64 Test Results

  • 186456 tests passed
  • 4864 tests skipped

@kazutakahirata kazutakahirata merged commit 00fb67a into llvm:main Nov 21, 2025
8 of 9 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_20251120_clang_tidy_modernize-loop-convert_Support branch November 21, 2025 18:09
aadeshps-mcw pushed a commit to aadeshps-mcw/llvm-project that referenced this pull request Nov 26, 2025
Identified with modernize-loop-convert.
Priyanshu3820 pushed a commit to Priyanshu3820/llvm-project that referenced this pull request Nov 26, 2025
Identified with modernize-loop-convert.
augusto2112 pushed a commit to augusto2112/llvm-project that referenced this pull request Dec 3, 2025
Identified with modernize-loop-convert.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants