-
Notifications
You must be signed in to change notification settings - Fork 15.4k
[Support] Use range-based for loops (NFC) #169001
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
kazutakahirata
merged 3 commits into
llvm:main
from
kazutakahirata:cleanup_20251120_clang_tidy_modernize-loop-convert_Support
Nov 21, 2025
Merged
[Support] Use range-based for loops (NFC) #169001
kazutakahirata
merged 3 commits into
llvm:main
from
kazutakahirata:cleanup_20251120_clang_tidy_modernize-loop-convert_Support
Nov 21, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Identified with modernize-loop-convert.
Member
|
@llvm/pr-subscribers-llvm-support Author: Kazu Hirata (kazutakahirata) ChangesIdentified with modernize-loop-convert. Full diff: https://github.com/llvm/llvm-project/pull/169001.diff 1 Files Affected:
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;
|
🐧 Linux x64 Test Results
|
tgymnich
approved these changes
Nov 21, 2025
kuhar
reviewed
Nov 21, 2025
arsenm
approved these changes
Nov 21, 2025
kuhar
approved these changes
Nov 21, 2025
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Identified with modernize-loop-convert.