[all-commits] [llvm/llvm-project] 82c7b9: [clang-format] Add Natural option for SortIncludes...

Tshaka Lekholoane via All-commits all-commits at lists.llvm.org
Wed Jul 29 07:10:14 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 82c7b9ac09e55cfc9887cb4e0de6221209c690b5
      https://github.com/llvm/llvm-project/commit/82c7b9ac09e55cfc9887cb4e0de6221209c690b5
  Author: Tshaka Lekholoane <mail+git at tshaka.dev>
  Date:   2026-07-29 (Wed, 29 Jul 2026)

  Changed paths:
    M clang/docs/ClangFormatStyleOptions.rst
    M clang/include/clang/Format/Format.h
    M clang/lib/Format/Format.cpp
    M clang/unittests/Format/ConfigParseTest.cpp
    M clang/unittests/Format/SortIncludesTest.cpp

  Log Message:
  -----------
  [clang-format] Add Natural option for SortIncludes (#210788)

`SortIncludes` currently orders includes lexicographically with the
option to ignore case or extension. This adds another option, `Natural`,
that compares embedded runs of digits as numbers rather than sequences
of characters, matching the "natural sort" behaviour found in most file
managers and tools like `sort` when called with the `-V` option.

**Disclaimer**

AI assistance was used in initial exploration and review but the code is
"hand generated".



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list