diff options
Diffstat (limited to 'clang/unittests/Format')
| -rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index b3fb776a7a6..9cf4efcbf1f 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -7698,6 +7698,16 @@ TEST_F(FormatTest, AllmanBraceBreaking) { "#endif", BreakBeforeBrace); + // This shouldn't affect ObjC blocks. + verifyFormat("[self doSomeThingWithACompletionHandler:^{\n" + " // ...\n" + " int i;\n" + "}];"); + verifyFormat("void (^block)(void) = ^{\n" + " // ...\n" + " int i;\n" + "};"); + BreakBeforeBrace.ColumnLimit = 19; verifyFormat("void f() { int i; }", BreakBeforeBrace); BreakBeforeBrace.ColumnLimit = 18; |

