[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 01:51:32 PDT 2019
Manikishan added inline comments.
================
Comment at: unittests/Format/SortIncludesTest.cpp:709
+ "#include \"pathnames.h\"\n",
+ sort("#include <sys/param.h>\n"
+ "#include <sys/types.h>\n"
----------------
MyDeveloperDay wrote:
> should you add a test which has groups defined already, I'm unclear as to how your algorithm works across groups?
The include groups in NetBSD files are made depending on the use, for example
Kernel headers, File systems headers, Network and protocol headers are grouped together.
My algorithm is to detect the include type by regex and assign a priority to them to sort. And to regroup I used IncludeCategories.
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