[all-commits] [llvm/llvm-project] 8a780a: [clang-format] Group options that pack constructor...

Owen via All-commits all-commits at lists.llvm.org
Fri Aug 27 06:33:01 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8a780a2f18c590e27e51a2ab3cc81b481c42b42a
      https://github.com/llvm/llvm-project/commit/8a780a2f18c590e27e51a2ab3cc81b481c42b42a
  Author: owenca <owenpiano at gmail.com>
  Date:   2021-08-27 (Fri, 27 Aug 2021)

  Changed paths:
    M clang/docs/ClangFormatStyleOptions.rst
    M clang/include/clang/Format/Format.h
    M clang/lib/Format/ContinuationIndenter.cpp
    M clang/lib/Format/Format.cpp
    M clang/lib/Format/TokenAnnotator.cpp
    M clang/unittests/Format/FormatTest.cpp

  Log Message:
  -----------
  [clang-format] Group options that pack constructor initializers

Add a new option PackConstructorInitializers and deprecate the
related options ConstructorInitializerAllOnOneLineOrOnePerLine and
AllowAllConstructorInitializersOnNextLine. Below is the mapping:

PackConstructorInitializers  ConstructorInitializer... AllowAll...
        Never                            -                  -
        BinPack                        false                -
        CurrentLine                    true               false
        NextLine                       true               true

The option value Never fixes PR50549 by always placing each
constructor initializer on its own line.

Differential Revision: https://reviews.llvm.org/D108752




More information about the All-commits mailing list