================
@@ -3632,13 +3641,17 @@ static void sortCppIncludes(const FormatStyle &Style,
if (Style.SortIncludes.Enabled) {
stable_sort(Indices, [&](unsigned LHSI, unsigned RHSI) {
+ if (Includes[LHSI].Priority != Includes[RHSI].Priority)
+ return Includes[LHSI].Priority < Includes[RHSI].Priority;
+
SmallString<128> LHSStem, RHSStem;
if (Style.SortIncludes.IgnoreExtension) {
LHSStem = Includes[LHSI].Filename;
RHSStem = Includes[RHSI].Filename;
llvm::sys::path::replace_extension(LHSStem, "");
llvm::sys::path::replace_extension(RHSStem, "");
}
+
std::string LHSStemLower, RHSStemLower;
std::string LHSFilenameLower, RHSFilenameLower;
if (Style.SortIncludes.IgnoreCase) {
----------------
tshakalekholoane wrote:
Okay. I made the changes.
https://github.com/llvm/llvm-project/pull/210788
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits