benhamilton updated this revision to Diff 132185. benhamilton added a comment.
Move to general property section 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"); + // BinPackObjCProtocolList 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 @@ -703,6 +703,7 @@ GoogleStyle.AllowShortLoopsOnASingleLine = true; GoogleStyle.AlwaysBreakBeforeMultilineStrings = true; GoogleStyle.AlwaysBreakTemplateDeclarations = true; + GoogleStyle.BinPackObjCProtocolList = FormatStyle::BPS_Never; GoogleStyle.ConstructorInitializerAllOnOneLineOrOnePerLine = true; GoogleStyle.DerivePointerAlignment = true; GoogleStyle.IncludeCategories = {
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"); + // BinPackObjCProtocolList 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 @@ -703,6 +703,7 @@ GoogleStyle.AllowShortLoopsOnASingleLine = true; GoogleStyle.AlwaysBreakBeforeMultilineStrings = true; GoogleStyle.AlwaysBreakTemplateDeclarations = true; + GoogleStyle.BinPackObjCProtocolList = FormatStyle::BPS_Never; GoogleStyle.ConstructorInitializerAllOnOneLineOrOnePerLine = true; GoogleStyle.DerivePointerAlignment = true; GoogleStyle.IncludeCategories = {
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits