diff options
| author | Daniel Jasper <djasper@google.com> | 2014-10-22 09:12:44 +0000 |
|---|---|---|
| committer | Daniel Jasper <djasper@google.com> | 2014-10-22 09:12:44 +0000 |
| commit | 76284683f12a7b8c98711963f59662d679f70712 (patch) | |
| tree | c623942055dcdb53646d07b2f2669573d563f0b1 /clang/lib/Format | |
| parent | b52c69e56777eabd4570464b96a7dd1129c2bb91 (diff) | |
| download | bcm5719-llvm-76284683f12a7b8c98711963f59662d679f70712.tar.gz bcm5719-llvm-76284683f12a7b8c98711963f59662d679f70712.zip | |
clang-format: Use AllowShortBlocksOnASingleLine for ObjC blocks, too.
llvm-svn: 220375
Diffstat (limited to 'clang/lib/Format')
| -rw-r--r-- | clang/lib/Format/TokenAnnotator.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index 0f4c2e2d50a..285c23139ce 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -1782,6 +1782,9 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine &Line, } else if (Style.Language == FormatStyle::LK_Proto && Left.isNot(tok::l_brace) && Right.Type == TT_SelectorName) { return true; + } else if (Left.Type == TT_ObjCBlockLBrace && + !Style.AllowShortBlocksOnASingleLine) { + return true; } // If the last token before a '}' is a comma or a trailing comment, the |

