Index: clang/lib/Format/ContinuationIndenter.cpp =================================================================== --- clang/lib/Format/ContinuationIndenter.cpp +++ clang/lib/Format/ContinuationIndenter.cpp @@ -1451,6 +1451,8 @@ CurrentState.NestedBlockIndent = CurrentState.Indent; if (Style.PackConstructorInitializers > FormatStyle::PCIS_BinPack) CurrentState.AvoidBinPacking = true; + else + CurrentState.BreakBeforeParameter = false; } if (Current.is(TT_InheritanceColon)) { CurrentState.Indent = Index: clang/unittests/Format/FormatTest.cpp =================================================================== --- clang/unittests/Format/FormatTest.cpp +++ clang/unittests/Format/FormatTest.cpp @@ -7950,6 +7950,11 @@ verifyFormat("template \n" "Constructor() : Initializer(FitsOnTheLine) {}", getStyleWithColumns(Style, 50)); + verifyFormat( + "Class::Class(int some, int arguments, int loooooooooooooonoooooog,\n" + " int mooooooooooooore) noexcept :\n" + " Super{some, arguments}, Member{5}, Member2{2} {}", + Style); Style.PackConstructorInitializers = FormatStyle::PCIS_NextLine; verifyFormat( "SomeClass::Constructor() :\n" @@ -7987,8 +7992,8 @@ " aaaaaaaaaaaaaaa(aaaaaaaaaaaa) {}", Style); verifyFormat("Constructor(aaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,\n" - " aaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) :\n" - " aaaaaaaaaa(aaaaaa) {}", + " aaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) : " + "aaaaaaaaaa(aaaaaa) {}", Style); verifyFormat("Constructor() :\n"