forked from OSchip/llvm-project
clang-format: Don't wrap after @interface.
This fixes llvm.org/PR19450. Before: @interface BookmarkHomeHandsetViewController ()<BookmarkAllCollectionViewDelegate, BookmarkFolderCollectionViewDelegate, BookmarkMenuViewControllerDelegate, BookmarkSearchViewControllerDelegate> { } After: @interface aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ()< aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa> { } llvm-svn: 207400
This commit is contained in:
parent
9a342778b9
commit
437c3f5188
|
@ -1583,6 +1583,8 @@ bool TokenAnnotator::canBreakBefore(const AnnotatedLine &Line,
|
|||
const FormatToken &Left = *Right.Previous;
|
||||
if (Left.is(tok::at))
|
||||
return false;
|
||||
if (Left.Tok.getObjCKeywordID() == tok::objc_interface)
|
||||
return false;
|
||||
if (Right.Type == TT_StartOfName || Right.is(tok::kw_operator))
|
||||
return true;
|
||||
if (Right.isTrailingComment())
|
||||
|
|
|
@ -5848,6 +5848,16 @@ TEST_F(FormatTest, FormatObjCInterface) {
|
|||
"}\n"
|
||||
"+ (id)init;\n"
|
||||
"@end");
|
||||
|
||||
FormatStyle OnePerLine = getGoogleStyle();
|
||||
OnePerLine.BinPackParameters = false;
|
||||
verifyFormat("@interface aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ()<\n"
|
||||
" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,\n"
|
||||
" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,\n"
|
||||
" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,\n"
|
||||
" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa> {\n"
|
||||
"}",
|
||||
OnePerLine);
|
||||
}
|
||||
|
||||
TEST_F(FormatTest, FormatObjCImplementation) {
|
||||
|
|
Loading…
Reference in New Issue