summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2014-03-28 07:48:59 +0000
committerDaniel Jasper <djasper@google.com>2014-03-28 07:48:59 +0000
commit395193c7a0cd1366e33c1bd23590eb6ea06f5251 (patch)
treec0e817d6125c0726a8912a89ae4b9b6e244a7ff6 /clang/unittests/Format/FormatTest.cpp
parentba539d8dc84cb0c0d823f08febb4ed441155aaa1 (diff)
downloadbcm5719-llvm-395193c7a0cd1366e33c1bd23590eb6ea06f5251.tar.gz
bcm5719-llvm-395193c7a0cd1366e33c1bd23590eb6ea06f5251.zip
clang-format: Recognize more ObjC blocks with parameters/return type.
llvm-svn: 204990
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 3d1e5a5d8e2..2bf55125765 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -8125,6 +8125,10 @@ TEST_F(FormatTest, FormatsLambdas) {
TEST_F(FormatTest, FormatsBlocks) {
verifyFormat("int (^Block)(int, int);");
verifyFormat("int (^Block1)(int, int) = ^(int i, int j)");
+ verifyFormat("void (^block)(int) = ^(id test) { int i; };");
+ verifyFormat("void (^block)(int) = ^(int test) { int i; };");
+ verifyFormat("void (^block)(int) = ^id(int test) { int i; };");
+ verifyFormat("void (^block)(int) = ^int(int test) { int i; };");
verifyFormat("foo(^{ bar(); });");
verifyFormat("foo(a, ^{ bar(); });");
OpenPOWER on IntegriCloud