[PATCH] D64695: [clang-format] Added new style rule: SortNetBSDIncludes

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 15 09:17:16 PDT 2019


lebedev.ri added a comment.

In D64695#1585772 <https://reviews.llvm.org/D64695#1585772>, @Manikishan wrote:

> In D64695#1585754 <https://reviews.llvm.org/D64695#1585754>, @rdwampler wrote:
>
> > I am not quite sure why this change is required to sort the headers for NetBSD, you can set the priorities via `IncludeStyle.IncludeCategories`. Is that not sufficient?
>
>
> It can be done by setting priorities in IncludeCategories, but here we have nearly 40+ cases and categories to hardcode due to complex interdependencies between their headers. So, I have added this style reducing the cases using regex. And if this is fully parameterised any OS related project can add their own header priorities.


Note that `IncludeCategories` is already a regex - https://clang.llvm.org/docs/ClangFormatStyleOptions.html


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64695/new/

https://reviews.llvm.org/D64695





More information about the cfe-commits mailing list