hokein added inline comments.
================ Comment at: clang-tools-extra/clangd/HeaderSourceSwitch.cpp:113 + auto Best = Candidates.begin(); + for (auto It = Candidates.begin(); It != Candidates.end(); ++It) { + if (It->second > Best->second) ---------------- kadircet wrote: > nit: `for(auto &It : Candidates)` for-range doesn't work here, the type is `StringMapEntry` which is a non-copy structure, we need to copy an iterator for recording the `Best`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67907/new/ https://reviews.llvm.org/D67907 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits