]> granicus.if.org Git - clang/commit
clang-format: Introduce BreakInheritanceList option
authorFrancois Ferrand <thetypz@gmail.com>
Mon, 11 Jun 2018 14:41:26 +0000 (14:41 +0000)
committerFrancois Ferrand <thetypz@gmail.com>
Mon, 11 Jun 2018 14:41:26 +0000 (14:41 +0000)
commita1f8bd3778cc5a53236a53500c6ab184e945eefa
tree20a5fa82ddbbed112810027b5699a48399d03902
parent78925906a9022bae74e22f9181e91dd63d45bba2
clang-format: Introduce BreakInheritanceList option

Summary:
This option replaces the BreakBeforeInheritanceComma option with an
enum, thus introducing a mode where the colon stays on the same line as
constructor declaration:

  // When it fits on line:
  class A : public B, public C {
    ...
  };

  // When it does not fit:
  class A :
      public B,
      public C {
    ...
  };

This matches the behavior of the `BreakConstructorInitializers` option,
introduced in https://reviews.llvm.org/D32479.

Reviewers: djasper, klimek

Reviewed By: djasper

Subscribers: mzeren-vmw, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@334408 91177308-0d34-0410-b5e6-96231b3b80d8
docs/ClangFormatStyleOptions.rst
include/clang/Format/Format.h
lib/Format/ContinuationIndenter.cpp
lib/Format/Format.cpp
lib/Format/TokenAnnotator.cpp
unittests/Format/FormatTest.cpp