clang-format: [ObjC] Wrap ObjC method declarations before annotations.
Before:
- (instancetype)initXxxxxxxxxxxxxxxxxxxxxxxxx:(id<x>)x
y:(id<yyyyyyyyyyyyyyyyyyyy>)
y NS_DESIGNATED_INITIALIZER;
After:
- (instancetype)initXxxxxxxxxxxxxxxxxxxxxxxxx:(id<x>)x
y:(id<yyyyyyyyyyyyyyyyyyyy>)y
NS_DESIGNATED_INITIALIZER;
llvm-svn: 219564
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 4091cd5..758e504 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -6452,6 +6452,10 @@
" evenLongerKeyword:(float)theInterval\n"
" error:(NSError **)theError {\n"
"}");
+ verifyFormat("- (instancetype)initXxxxxx:(id<x>)x\n"
+ " y:(id<yyyyyyyyyyyyyyyyyyyy>)y\n"
+ " NS_DESIGNATED_INITIALIZER;",
+ getLLVMStyleWithColumns(60));
}
TEST_F(FormatTest, FormatObjCMethodExpr) {