Index: lib/Format/TokenAnnotator.cpp =================================================================== --- lib/Format/TokenAnnotator.cpp +++ lib/Format/TokenAnnotator.cpp @@ -2077,7 +2077,7 @@ if (Line.Type == LT_ObjCMethodDecl) { if (Left.is(TT_ObjCMethodSpecifier)) return true; - if (Left.is(tok::r_paren) && Right.is(tok::identifier)) + if (Left.is(tok::r_paren) && Right.is(TT_SelectorName)) // Don't space between ')' and return false; } Index: unittests/Format/FormatTest.cpp =================================================================== --- unittests/Format/FormatTest.cpp +++ unittests/Format/FormatTest.cpp @@ -7433,6 +7433,7 @@ " y:(id)y\n" " NS_DESIGNATED_INITIALIZER;", getLLVMStyleWithColumns(60)); + verifyFormat("- (void)delete:(id)sender\n"); // Continuation indent width should win over aligning colons if the function // name is long.