Index: lib/Format/Format.cpp =================================================================== --- lib/Format/Format.cpp +++ lib/Format/Format.cpp @@ -732,6 +732,7 @@ GoogleStyle.SpacesInContainerLiterals = false; } else if (Language == FormatStyle::LK_ObjC) { GoogleStyle.ColumnLimit = 100; + GoogleStyle.IndentWrappedFunctionNames = true; } return GoogleStyle; Index: unittests/Format/FormatTestObjC.cpp =================================================================== --- unittests/Format/FormatTestObjC.cpp +++ unittests/Format/FormatTestObjC.cpp @@ -229,6 +229,7 @@ verifyFormat("@interface Foo (HackStuff)\n" "+ (id)init;\n" "@end"); + Style.BinPackParameters = false; Style.ColumnLimit = 80; verifyFormat("@interface aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ()<\n" @@ -382,9 +383,15 @@ " ofSize:(size_t)height\n" " :(size_t)width;"); + Style = getGoogleStyle(FormatStyle::LK_ObjC); + // Wrapped method parameters should be indented. + verifyFormat("- (VeryLongReturnTypeName)\n" + " veryLongMethodParameter:(VeryLongParameterName)" + "thisIsAVeryLongParameterName\n" + " longMethodParameter:(LongParameterName)" + "thisIsAlsoAnotherLongParameterName;"); // Continuation indent width should win over aligning colons if the function // name is long. - Style = getGoogleStyle(FormatStyle::LK_ObjC); Style.ColumnLimit = 40; Style.IndentWrappedFunctionNames = true; verifyFormat("- (void)shortf:(GTMFoo *)theFoo\n"