[clang] clang-format: Sort includes by stem rather than full filename (PR #137840)

2025-05-01 Thread Daan De Meyer via cfe-commits
https://github.com/DaanDeMeyer edited 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

[clang] clang-format: Sort includes by stem rather than full filename (PR #137840)

2025-05-01 Thread Daan De Meyer via cfe-commits
https://github.com/DaanDeMeyer edited 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

[clang] clang-format: Sort includes by stem rather than full filename (PR #137840)

2025-05-01 Thread Daan De Meyer via cfe-commits
https://github.com/DaanDeMeyer updated https://github.com/llvm/llvm-project/pull/137840 >From 4edcb6e0a0d4272a72a272ae97b32439f597ebf3 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Tue, 29 Apr 2025 18:26:36 +0200 Subject: [PATCH] clang-format: Add IncludeSortKey option Sorting by stem giv

[clang] clang-format: Sort includes by stem rather than full filename (PR #137840)

2025-05-01 Thread Owen Pan via cfe-commits
owenca wrote: IMO, unless it's a bug, we need a new option to ensure it's a non-breaking change. 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/c

[clang] clang-format: Sort includes by stem rather than full filename (PR #137840)

2025-04-30 Thread Björn Schäpers via cfe-commits
HazardyKnusperkeks wrote: > > You definitely need some tests. And I'm not sure if everyone would like > > that, of if it should be an option. > > I was hoping to get some feedback on whether it should be an option or not > before adding tests. I would be in favor. https://github.com/llvm/llv

[clang] clang-format: Sort includes by stem rather than full filename (PR #137840)

2025-04-30 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks commented: How do you think should files be handled, that only differ in the caseness of the extension? https://github.com/llvm/llvm-project/pull/137840 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang] clang-format: Sort includes by stem rather than full filename (PR #137840)

2025-04-29 Thread Daan De Meyer via cfe-commits
https://github.com/DaanDeMeyer updated https://github.com/llvm/llvm-project/pull/137840 >From ce0cb8586871f30f7e0883209f4bd30bf63471c5 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Tue, 29 Apr 2025 18:26:36 +0200 Subject: [PATCH] clang-format: Sort includes by stem rather than full filenam

[clang] clang-format: Sort includes by stem rather than full filename (PR #137840)

2025-04-29 Thread Daan De Meyer via cfe-commits
https://github.com/DaanDeMeyer updated https://github.com/llvm/llvm-project/pull/137840 >From 4747e31443d9dc273f875782f32e2e47ca9c2cbf Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Tue, 29 Apr 2025 18:26:36 +0200 Subject: [PATCH] clang-format: Sort includes by stem rather than full filenam

[clang] clang-format: Sort includes by stem rather than full filename (PR #137840)

2025-04-29 Thread Daan De Meyer via cfe-commits
DaanDeMeyer wrote: > You definitely need some tests. And I'm not sure if everyone would like that, > of if it should be an option. I was hoping to get some feedback on whether it should be an option or not before adding tests. https://github.com/llvm/llvm-project/pull/137840 _

[clang] clang-format: Sort includes by stem rather than full filename (PR #137840)

2025-04-29 Thread Björn Schäpers via cfe-commits
@@ -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(); -

[clang] clang-format: Sort includes by stem rather than full filename (PR #137840)

2025-04-29 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks edited 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

[clang] clang-format: Sort includes by stem rather than full filename (PR #137840)

2025-04-29 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks commented: You definitely need some tests. And I'm not sure if everyone would like that, of if it should be an option. https://github.com/llvm/llvm-project/pull/137840 ___ cfe-commits mailing list cfe-commits@list

[clang] clang-format: Sort includes by stem rather than full filename (PR #137840)

2025-04-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Daan De Meyer (DaanDeMeyer) Changes Sorting by stem gives nicer results when various header file names are substrings of other header file names, for example, a CLI application with a main header named analyze.h and a analyze-xxx.h

[clang] clang-format: Sort includes by stem rather than full filename (PR #137840)

2025-04-29 Thread Daan De Meyer via cfe-commits
https://github.com/DaanDeMeyer edited 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

[clang] clang-format: Sort includes by stem rather than full filename (PR #137840)

2025-04-29 Thread Daan De Meyer via cfe-commits
https://github.com/DaanDeMeyer created https://github.com/llvm/llvm-project/pull/137840 Sorting by stem gives nicer results when various header file names are substrings of other header file names, for example, a CLI application with a main header named analyze.h and a analyze-xxx.h header for

[clang] clang-format: Sort includes by stem rather than full filename (PR #137840)

2025-04-29 Thread Daan De Meyer via cfe-commits
https://github.com/DaanDeMeyer edited 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