[clang] clang-format: Add IncludeSortKey option (PR #137840)

via cfe-commits cfe-commits at lists.llvm.org
Mon May 19 08:40:16 PDT 2025


================
@@ -1647,7 +1647,7 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind Language) {
   LLVMStyle.SeparateDefinitionBlocks = FormatStyle::SDS_Leave;
   LLVMStyle.ShortNamespaceLines = 1;
   LLVMStyle.SkipMacroDefinitionBody = false;
-  LLVMStyle.SortIncludes = {/*Enabled=*/true, /*IgnoreCase=*/false};
+  LLVMStyle.SortIncludes = {/*Enabled=*/true, /*IgnoreCase=*/false, /*IgnoreExtension=*/false};
----------------
mydeveloperday wrote:

if I understand correctly... true is the current order not false, so the default should be true otherwise you'll cause every user of clang-format to have to add the IgnoreExtension setting if they don't want a change, am I correct?

https://github.com/llvm/llvm-project/pull/137840


More information about the cfe-commits mailing list