Page MenuHomeFreeBSD

clang-format: adjust to sort C++ headers per style(9)
ClosedPublic

Authored by ngie on Dec 29 2025, 6:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jun 4, 6:29 AM
Unknown Object (File)
May 21 2026, 9:46 PM
Unknown Object (File)
May 19 2026, 4:18 PM
Unknown Object (File)
May 17 2026, 5:49 AM
Unknown Object (File)
May 16 2026, 7:31 PM
Unknown Object (File)
May 16 2026, 7:31 PM
Unknown Object (File)
May 16 2026, 7:29 PM
Unknown Object (File)
May 15 2026, 2:43 AM

Details

Summary

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

Test Plan

Header includes like #include <cstdio>, etc, in the ATF project now sort before local headers post this change.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable