[llvm] [Support] Use range-based for loops (NFC) (PR #169001)
Jakub Kuderski via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 21 06:18:24 PST 2025
================
@@ -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;
----------------
kuhar wrote:
Use structured bindings?
https://github.com/llvm/llvm-project/pull/169001
More information about the llvm-commits
mailing list