From 395193c7a0cd1366e33c1bd23590eb6ea06f5251 Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Fri, 28 Mar 2014 07:48:59 +0000 Subject: clang-format: Recognize more ObjC blocks with parameters/return type. llvm-svn: 204990 --- clang/unittests/Format/FormatTest.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'clang/unittests/Format/FormatTest.cpp') 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(); });"); -- cgit v1.2.3