MyDeveloperDay added a comment. There also seems like alot of duplication between the existing sortCppIncludes
I think the only difference here is really just SmallVector<unsigned, 16> Indices; SmallVector<unsigned, 16> Includes_p; for (unsigned i = 0, e = Includes.size(); i != e; ++i) { unsigned pl = getNetBSDIncludePriority(Includes[i].Filename); Includes_p.push_back(pl); Indices.push_back(i); } vs the original SmallVector<unsigned, 16> Indices; for (unsigned i = 0, e = Includes.size(); i != e; ++i) Indices.push_back(i); plus way the sorting is performed, are we sure we couldn't have just made the original sorting more powerful based on style settings? ================ Comment at: lib/Format/Format.cpp:1878 + SmallVector<unsigned, 16> Indices; + SmallVector<unsigned, 16> Includes_p; + for (unsigned i = 0, e = Includes.size(); i != e; ++i) { ---------------- _p? I don't understand what it stands for? IncludesPriority? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64695/new/ https://reviews.llvm.org/D64695 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits