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)
Mon, Mar 16, 7:23 PM
Unknown Object (File)
Sat, Mar 14, 3:11 PM
Unknown Object (File)
Sun, Mar 1, 10:57 AM
Unknown Object (File)
Sat, Feb 28, 6:54 AM
Unknown Object (File)
Thu, Feb 19, 7:56 PM
Unknown Object (File)
Thu, Feb 19, 3:49 AM
Unknown Object (File)
Feb 3 2026, 8:31 AM
Unknown Object (File)
Jan 29 2026, 5: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 Skipped
Unit
Tests Skipped
Build Status
Buildable 69505
Build 66388: arc lint + arc unit