diff options
author | Birunthan Mohanathas <birunthan@mohanathas.com> | 2015-07-12 03:13:54 +0000 |
---|---|---|
committer | Birunthan Mohanathas <birunthan@mohanathas.com> | 2015-07-12 03:13:54 +0000 |
commit | 305fa9c2bfcd847171a1680a3b1b9ae69451ab26 (patch) | |
tree | 6ccdcfdde3d5b84f02929af94dce784ddab49c1b /clang/lib/Format/TokenAnnotator.cpp | |
parent | cbf08925efc9047a6e457101d5ffdb36774c769d (diff) | |
download | bcm5719-llvm-305fa9c2bfcd847171a1680a3b1b9ae69451ab26.tar.gz bcm5719-llvm-305fa9c2bfcd847171a1680a3b1b9ae69451ab26.zip |
clang-format: Add Mozilla brace breaking style
Differential Revision: http://reviews.llvm.org/D10883
llvm-svn: 241986
Diffstat (limited to 'clang/lib/Format/TokenAnnotator.cpp')
-rw-r--r-- | clang/lib/Format/TokenAnnotator.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index 4734ff350d7..1e0c979d91d 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -2108,7 +2108,9 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine &Line, return Right.HasUnescapedNewline; if (isAllmanBrace(Left) || isAllmanBrace(Right)) return Style.BreakBeforeBraces == FormatStyle::BS_Allman || - Style.BreakBeforeBraces == FormatStyle::BS_GNU; + Style.BreakBeforeBraces == FormatStyle::BS_GNU || + (Style.BreakBeforeBraces == FormatStyle::BS_Mozilla && + Line.startsWith(tok::kw_enum)); if (Style.Language == FormatStyle::LK_Proto && Left.isNot(tok::l_brace) && Right.is(TT_SelectorName)) return true; |