[clang] [clang-format] Add FilesBeforeFolders option to SortIncludes (PR #208954)
Savvas Shiakas via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 6 02:21:49 PDT 2026
================
@@ -6821,6 +6821,19 @@ the configuration (without a prefix: ``Auto``).
# include "A.inc" # include "A.h"
# include "A-util.h" # include "A.inc"
+ * ``bool FilesBeforeFolders`` When ``true``, sort includes so that files in a directory appear
----------------
Shiakaron wrote:
Just copying my response from https://github.com/llvm/llvm-project/pull/208954#issuecomment-5153407438
> I've added a UT to cover this. When false all angle bracket includes go after quotes simply because " < <. When true this can change because now we first check that files go before folders. So <alpha.hpp> will go before "beta/x.hpp".
https://github.com/llvm/llvm-project/pull/208954
More information about the cfe-commits
mailing list