================ @@ -1553,15 +1526,13 @@ static void emitDiagSubGroups(std::map<std::string, GroupInfo> &DiagsInGroup, RecordVec &GroupsInPedantic, raw_ostream &OS) { OS << "static const int16_t DiagSubGroups[] = {\n" << " /* Empty */ -1,\n"; - for (auto const &I : DiagsInGroup) { - const bool IsPedantic = I.first == "pedantic"; - - const std::vector<std::string> &SubGroups = I.second.SubGroups; + for (auto const &[Name, Group] : DiagsInGroup) { + const bool IsPedantic = Name == "pedantic"; + const std::vector<std::string> &SubGroups = Group.SubGroups; if (!SubGroups.empty() || (IsPedantic && !GroupsInPedantic.empty())) { - OS << " /* DiagSubGroup" << I.second.IDNo << " */ "; + OS << " /* DiagSubGroup" << Group.IDNo << " */ "; for (auto const &SubGroup : SubGroups) { - std::map<std::string, GroupInfo>::const_iterator RI = - DiagsInGroup.find(SubGroup); + auto RI = DiagsInGroup.find(SubGroup); ---------------- erichkeane wrote:
Ah! I'd not realized we had that cutout. This is fine then. https://github.com/llvm/llvm-project/pull/115573 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits