@@ -166,6 +166,16 @@ struct IncludeStyle {
/// directives that use the specified character are considered.
/// \version 19
MainIncludeCharDiscriminator MainIncludeChar;
+
+ enum IncludeSortKeyDiscriminator : int8_t {
+/// Includes are sorted alphabetically by their f
@@ -4226,6 +4226,19 @@ the configuration (without a prefix: ``Auto``).
``ClassImpl.hpp`` would not have the main include file put on top
before any other include.
+.. _IncludeSortKey:
+
+**IncludeSortKey** (``IncludeSortKeyDiscriminator``)
:versionbadge:`clang-format 20`
@@ -4226,6 +4226,19 @@ the configuration (without a prefix: ``Auto``).
``ClassImpl.hpp`` would not have the main include file put on top
before any other include.
+.. _IncludeSortKey:
HazardyKnusperkeks wrote:
Did you write this on your own? You need to d
@@ -166,6 +166,16 @@ struct IncludeStyle {
/// directives that use the specified character are considered.
/// \version 19
MainIncludeCharDiscriminator MainIncludeChar;
+
+ enum IncludeSortKeyDiscriminator : int8_t {
HazardyKnusperkeks wrote:
Can you so
@@ -4226,6 +4226,19 @@ the configuration (without a prefix: ``Auto``).
``ClassImpl.hpp`` would not have the main include file put on top
before any other include.
+.. _IncludeSortKey:
+
+**IncludeSortKey** (``IncludeSortKeyDiscriminator``)
:versionbadge:`clang-format 20`
https://github.com/DaanDeMeyer updated
https://github.com/llvm/llvm-project/pull/137840
>From 73a18a033e0d978d1662a391fedf731dbad7de27 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
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff HEAD~1 HEAD --extensions cpp,h --
clang/include/clang/Format/Format.h
clang/include/
DaanDeMeyer wrote:
@HazardyKnusperkeks @owenca Updated PR to introduce a new option
`IncludeSortKey`, PTAL!
https://github.com/llvm/llvm-project/pull/137840
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman
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