summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2016-09-26 22:19:08 +0000
committerDaniel Jasper <djasper@google.com>2016-09-26 22:19:08 +0000
commite31388aee9bf8bef0beaba1de7998565a468af40 (patch)
tree5899bd01470f2a68e05b677f60493af3387d8d99 /clang/unittests/Format
parenteae64f8a62327baf4357bc86ad9b68f336ff432a (diff)
downloadbcm5719-llvm-e31388aee9bf8bef0beaba1de7998565a468af40.tar.gz
bcm5719-llvm-e31388aee9bf8bef0beaba1de7998565a468af40.zip
[clang-format] Don't allow newline after uppercase Obj-C block return types
Fixes the following: BOOL (^aaa)(void) = ^BOOL { }; The first BOOL's token was getting set to TT_FunctionAnnotationRParen incorrectly, which was causing an unexpected newline after (^aaa). This was introduced in r245846. Patch by Kent Sutherland, thank you! llvm-svn: 282448
Diffstat (limited to 'clang/unittests/Format')
-rw-r--r--clang/unittests/Format/FormatTest.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index bac2a5b7a91..06a7e7ee917 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -11156,6 +11156,8 @@ TEST_F(FormatTest, FormatsBlocks) {
" }\n"
"});");
verifyFormat("Block b = ^int *(A *a, B *b) {}");
+ verifyFormat("BOOL (^aaa)(void) = ^BOOL {\n"
+ "};");
FormatStyle FourIndent = getLLVMStyle();
FourIndent.ObjCBlockIndentWidth = 4;
OpenPOWER on IntegriCloud