]> granicus.if.org Git - clang/commit
[clang-format] Don't allow newline after uppercase Obj-C block return types
authorDaniel Jasper <djasper@google.com>
Mon, 26 Sep 2016 22:19:08 +0000 (22:19 +0000)
committerDaniel Jasper <djasper@google.com>
Mon, 26 Sep 2016 22:19:08 +0000 (22:19 +0000)
commit199dbc55ee14d177b12436c7058c75ffdd25da1c
tree61e13718082341b0a75185ccbb0f875c62966308
parent4765e80edb821a082e10f5ee1cb7b19d8fe84475
[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!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282448 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Format/TokenAnnotator.cpp
unittests/Format/FormatTest.cpp