================ @@ -3219,17 +3219,19 @@ static void sortCppIncludes(const FormatStyle &Style, if (Style.SortIncludes == FormatStyle::SI_CaseInsensitive) { stable_sort(Indices, [&](unsigned LHSI, unsigned RHSI) { - const auto LHSFilenameLower = Includes[LHSI].Filename.lower(); - const auto RHSFilenameLower = Includes[RHSI].Filename.lower(); - return std::tie(Includes[LHSI].Priority, LHSFilenameLower, - Includes[LHSI].Filename) < - std::tie(Includes[RHSI].Priority, RHSFilenameLower, - Includes[RHSI].Filename); + const auto LHSStem = llvm::sys::path::stem(Includes[LHSI].Filename); + const auto RHSStem = llvm::sys::path::stem(Includes[RHSI].Filename); ---------------- HazardyKnusperkeks wrote:
This two lines can be moved out of the `if` and `else`. https://github.com/llvm/llvm-project/pull/137840 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits