Date: Sun, 22 Feb 2026 03:44:30 +0000 From: Enji Cooper <ngie@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 7111f124b8f8 - stable/15 - clang-format: adjust to sort C++ headers per style(9) Message-ID: <699a7b9e.21f8e.7862b5a0@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=7111f124b8f8398b64db9280c5d090c7e45bef9b commit 7111f124b8f8398b64db9280c5d090c7e45bef9b Author: Enji Cooper <ngie@FreeBSD.org> AuthorDate: 2026-01-31 04:14:07 +0000 Commit: Enji Cooper <ngie@FreeBSD.org> CommitDate: 2026-02-22 03:44:24 +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 (cherry picked from commit ab9b04736945537743eb0624ead7a4fa4b960783) --- .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.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?699a7b9e.21f8e.7862b5a0>
