Skip to content

Commit 00fb67a

Browse files
[Support] Use range-based for loops (NFC) (llvm#169001)
Identified with modernize-loop-convert.
1 parent 226c51c commit 00fb67a

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

llvm/lib/Support/CommandLine.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -602,10 +602,7 @@ static Option *LookupNearestOption(StringRef Arg,
602602
// Find the closest match.
603603
Option *Best = nullptr;
604604
unsigned BestDistance = 0;
605-
for (StringMap<Option *>::const_iterator it = OptionsMap.begin(),
606-
ie = OptionsMap.end();
607-
it != ie; ++it) {
608-
Option *O = it->second;
605+
for (const auto &[_, O] : OptionsMap) {
609606
// Do not suggest really hidden options (not shown in any help).
610607
if (O->getOptionHiddenFlag() == ReallyHidden)
611608
continue;

0 commit comments

Comments
 (0)