[PATCH] D42708: [clang-format] Set ObjCBinPackProtocolList to Never for google style
Ben Hamilton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 31 08:47:57 PST 2018
benhamilton updated this revision to Diff 132189.
benhamilton added a comment.
Fix comment.
Repository:
rC Clang
https://reviews.llvm.org/D42708
Files:
lib/Format/Format.cpp
unittests/Format/FormatTestObjC.cpp
Index: unittests/Format/FormatTestObjC.cpp
===================================================================
--- unittests/Format/FormatTestObjC.cpp
+++ unittests/Format/FormatTestObjC.cpp
@@ -322,13 +322,16 @@
verifyFormat("@interface Foo (HackStuff) <MyProtocol>\n"
"+ (id)init;\n"
"@end");
- Style.BinPackParameters = false;
- Style.ColumnLimit = 80;
- verifyFormat("@interface aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa () <\n"
- " aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,\n"
- " aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,\n"
- " aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,\n"
- " aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa> {\n"
+ Style.ColumnLimit = 40;
+ // BinPackParameters should be true by default.
+ verifyFormat("void eeeeeeee(int eeeee, int eeeee,\n"
+ " int eeeee, int eeeee);\n");
+ // ObjCBinPackProtocolList should be BPS_Never by default.
+ verifyFormat("@interface fffffffffffff () <\n"
+ " fffffffffffff,\n"
+ " fffffffffffff,\n"
+ " fffffffffffff,\n"
+ " fffffffffffff> {\n"
"}");
}
Index: lib/Format/Format.cpp
===================================================================
--- lib/Format/Format.cpp
+++ lib/Format/Format.cpp
@@ -710,6 +710,7 @@
GoogleStyle.IncludeIsMainRegex = "([-_](test|unittest))?$";
GoogleStyle.IndentCaseLabels = true;
GoogleStyle.KeepEmptyLinesAtTheStartOfBlocks = false;
+ GoogleStyle.ObjCBinPackProtocolList = FormatStyle::BPS_Never;
GoogleStyle.ObjCSpaceAfterProperty = false;
GoogleStyle.ObjCSpaceBeforeProtocolList = true;
GoogleStyle.PointerAlignment = FormatStyle::PAS_Left;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42708.132189.patch
Type: text/x-patch
Size: 1747 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180131/fdfc1ede/attachment.bin>
More information about the cfe-commits
mailing list