diff options
| author | Daniel Jasper <djasper@google.com> | 2014-05-22 13:53:55 +0000 |
|---|---|---|
| committer | Daniel Jasper <djasper@google.com> | 2014-05-22 13:53:55 +0000 |
| commit | 565ed5ed08fda3af5d26d6f0a47f4bb36d3e8b57 (patch) | |
| tree | 950cf368c48583baddf4f0b25ddeed96a0cb27d2 /clang/unittests/Format | |
| parent | 498e56adb6c05d69afc300eeadce12fadfc3e477 (diff) | |
| download | bcm5719-llvm-565ed5ed08fda3af5d26d6f0a47f4bb36d3e8b57.tar.gz bcm5719-llvm-565ed5ed08fda3af5d26d6f0a47f4bb36d3e8b57.zip | |
clang-format: Don't use Allman brace breaking for ObjC blocks.
It just seems wrong. This fixes llvm.org/PR19736.
llvm-svn: 209440
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; |

