[clang] clang-format: Add IncludeSortKey option (PR #137840)
Owen Pan via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 15 01:56:34 PDT 2025
================
@@ -4385,8 +4385,18 @@ struct FormatStyle {
/// #include "B/a.h" #include "a/b.h"
/// \endcode
bool IgnoreCase;
+ /// When sorting includes in each block, only take file extensions into
+ /// account if two includes compare equal otherwise.
+ /// \code
+ /// true: false:
+ /// # include "A.h" vs. # include "A-util.h"
----------------
owenca wrote:
```suggestion
/// # include "A.h" vs. # include "A-util.h"
```
as suggested before.
https://github.com/llvm/llvm-project/pull/137840
More information about the cfe-commits
mailing list