git: ab9b04736945 - main - clang-format: adjust to sort C++ headers per style(9)

From: Enji Cooper <ngie_at_FreeBSD.org>
Date: Sat, 31 Jan 2026 04:14:32 UTC
The branch main has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=ab9b04736945537743eb0624ead7a4fa4b960783

commit ab9b04736945537743eb0624ead7a4fa4b960783
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-01-31 04:14:07 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-01-31 04:14:10 +0000

    clang-format: adjust to sort C++ headers per style(9)
    
    Many standard C++ headers do not have the .h file extension: some, such as
    `iostream`, lack it; others have a .hpp file extension. Moreover, some
    projects (like ATF/Kyua) also contain .ipp files, which are C++ "interface"
    files.
    
    Relax the regular expression to ensure that non-traditional C "system"
    headers, C++ headers, etc, with angle brackets are sorted before
    "local" headers.
    
    MFC after:      1 week
    Reviewed by: markj
    Differential Revision: https://reviews.freebsd.org/D54401
---
 .clang-format | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.clang-format b/.clang-format
index 3d436fa0b35d..efe9f1202bde 100644
--- a/.clang-format
+++ b/.clang-format
@@ -151,10 +151,10 @@ IncludeCategories:
   - Regex: '^<(fs|nfs(|client|server)|ufs)/'
     Priority: 8
     SortPriority: 80
-  - Regex: '^<[^/].*\.h'
+  - Regex: '^<[^/].*'
     Priority: 9
     SortPriority: 90
-  - Regex: '^\".*\.h\"'
+  - Regex: '^\".*\"'
     Priority: 10
     SortPriority: 100
 # LLVM's header include ordering style is almost the exact opposite of ours.