Index: lib/Format/ContinuationIndenter.cpp =================================================================== --- lib/Format/ContinuationIndenter.cpp +++ lib/Format/ContinuationIndenter.cpp @@ -1211,7 +1211,6 @@ // void SomeFunction(vector< // break // int> v); // FIXME: We likely want to do this for more combinations of brackets. - // Verify that it is wanted for ObjC, too. if (Current.is(tok::less) && Current.ParentBracket == tok::l_paren) { NewIndent = std::max(NewIndent, State.Stack.back().Indent); LastSpace = std::max(LastSpace, State.Stack.back().Indent); Index: unittests/Format/FormatTestObjC.cpp =================================================================== --- unittests/Format/FormatTestObjC.cpp +++ unittests/Format/FormatTestObjC.cpp @@ -189,6 +189,17 @@ "}\n"); } +TEST_F(FormatTestObjC, FormatObjCGenerics) { + Style.ColumnLimit = 40; + verifyFormat("int aaaaaaaaaaaaaaaa(\n" + " NSArray\n" + " aaaaaaaaaaaaaaaaa);\n"); + verifyFormat("int aaaaaaaaaaaaaaaa(\n" + " NSArray *>\n" + " aaaaaaaaaaaaaaaaa);\n"); +} + TEST_F(FormatTestObjC, FormatObjCInterface) { verifyFormat("@interface Foo : NSObject {\n" "@public\n"