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

Manikishan Ghantasala via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 15 12:43:08 PDT 2019

Manikishan added a comment.

In D64695#1586157 <https://reviews.llvm.org/D64695#1586157>, @MyDeveloperDay wrote:

> I appreciate what you've done to make this patch less duplicated code..but now you've almost got to the point where being able to control it all via configuration.
> I'm with @rdwampler I think you should be able to extend the include categories...and then this becomes a very powerful capability. There are many people who use clang-format for a "non" standard style source trees, and they might like to use such a capability themselves without having to inherit from NetBSD type.
> I agree it will be complex, but that is a good justification for adding hard coded a NetBSD style.

Thanks, I will try to implement it as suggested. 
This is my proposal algorithm:

1. Modify Include.Categories by adding one more field for grouping priority.
2. Add support for this third field in sortIncludes.

Am I missing anything?

  rC Clang



More information about the cfe-commits mailing list