Index: lib/Format/Format.cpp =================================================================== --- lib/Format/Format.cpp +++ lib/Format/Format.cpp @@ -693,7 +693,7 @@ GoogleStyle.IndentCaseLabels = true; GoogleStyle.KeepEmptyLinesAtTheStartOfBlocks = false; GoogleStyle.ObjCSpaceAfterProperty = false; - GoogleStyle.ObjCSpaceBeforeProtocolList = false; + GoogleStyle.ObjCSpaceBeforeProtocolList = true; GoogleStyle.PointerAlignment = FormatStyle::PAS_Left; GoogleStyle.SpacesBeforeTrailingComments = 2; GoogleStyle.Standard = FormatStyle::LS_Auto; Index: unittests/Format/FormatTestObjC.cpp =================================================================== --- unittests/Format/FormatTestObjC.cpp +++ unittests/Format/FormatTestObjC.cpp @@ -211,7 +211,7 @@ "@end"); Style = getGoogleStyle(FormatStyle::LK_ObjC); - verifyFormat("@interface Foo : NSObject {\n" + verifyFormat("@interface Foo : NSObject {\n" " @public\n" " int field1;\n" " @protected\n" @@ -223,15 +223,15 @@ "}\n" "+ (id)init;\n" "@end"); - verifyFormat("@interface Foo : Bar\n" + verifyFormat("@interface Foo : Bar \n" "+ (id)init;\n" "@end"); - verifyFormat("@interface Foo (HackStuff)\n" + verifyFormat("@interface Foo (HackStuff) \n" "+ (id)init;\n" "@end"); Style.BinPackParameters = false; Style.ColumnLimit = 80; - verifyFormat("@interface aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ()<\n" + verifyFormat("@interface aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa () <\n" " aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,\n" " aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,\n" " aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,\n" @@ -354,7 +354,7 @@ "@end"); Style = getGoogleStyle(FormatStyle::LK_ObjC); - verifyFormat("@protocol MyProtocol\n" + verifyFormat("@protocol MyProtocol \n" "- (NSUInteger)numberOfThings;\n" "@end"); }