================ @@ -1419,16 +1412,14 @@ void clang::EmitClangDiagsDefs(const RecordKeeper &Records, raw_ostream &OS, InferPedantic inferPedantic(DGParentMap, Diags, DiagGroups, DiagsInGroup); inferPedantic.compute(&DiagsInPedantic, (RecordVec*)nullptr); - for (unsigned i = 0, e = Diags.size(); i != e; ++i) { - const Record &R = *Diags[i]; - + for (const Record *RP : Diags) { + const Record &R = *RP; ---------------- jurahul wrote:
I can clean this up in this PR. I was looking into whether LLVM has any iterator adapters for this earlier and could not find one. But looking again, it seems `make_pointee_range` does what we want, so let me try it https://github.com/llvm/llvm-project/pull/115959 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits