[all-commits] [llvm/llvm-project] af8f1d: [clang-format] Use std::iota and reserve when sort...

Marek Kurdej via All-commits all-commits at lists.llvm.org
Tue Feb 1 05:30:14 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: af8f1dbb43bc1a6267ea0b760c7b0fae635938ff
      https://github.com/llvm/llvm-project/commit/af8f1dbb43bc1a6267ea0b760c7b0fae635938ff
  Author: Marek Kurdej <marek.kurdej+llvm.org at gmail.com>
  Date:   2022-02-01 (Tue, 01 Feb 2022)

  Changed paths:
    M clang/lib/Format/Format.cpp

  Log Message:
  -----------
  [clang-format] Use std::iota and reserve when sorting Java imports. NFC.

This way we have at most 1 allocation even if the number of includes is greater than the on-stack size of the small vector.




More information about the All-commits mailing list