diff options
author | Owen Pan <owenpiano@gmail.com> | 2019-08-11 17:48:36 +0000 |
---|---|---|
committer | Owen Pan <owenpiano@gmail.com> | 2019-08-11 17:48:36 +0000 |
commit | 10234da71d6aab25c82b1913829fed6ae3b408cc (patch) | |
tree | cf1b952a447bccc08f94a142dbf7f7bc8fb84925 /clang/lib/Format/TokenAnnotator.cpp | |
parent | ce6a2cf96656679defbe7049c07062e5a2940cbe (diff) | |
download | bcm5719-llvm-10234da71d6aab25c82b1913829fed6ae3b408cc.tar.gz bcm5719-llvm-10234da71d6aab25c82b1913829fed6ae3b408cc.zip |
[clang-format] Expand AllowShortBlocksOnASingleLine for WebKit
See PR40840
Differential Revision: https://reviews.llvm.org/D66059
llvm-svn: 368539
Diffstat (limited to 'clang/lib/Format/TokenAnnotator.cpp')
-rw-r--r-- | clang/lib/Format/TokenAnnotator.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index cc0a954dbfb..c0533bbcbdc 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -3044,7 +3044,8 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine &Line, Style.BraceWrapping.AfterEnum) || (Line.startsWith(tok::kw_class) && Style.BraceWrapping.AfterClass) || (Line.startsWith(tok::kw_struct) && Style.BraceWrapping.AfterStruct); - if (Left.is(TT_ObjCBlockLBrace) && !Style.AllowShortBlocksOnASingleLine) + if (Left.is(TT_ObjCBlockLBrace) && + Style.AllowShortBlocksOnASingleLine == FormatStyle::SBS_Never) return true; if (Left.is(TT_LambdaLBrace)) { |