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/Format.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/Format.cpp')
-rw-r--r-- | clang/lib/Format/Format.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index 1e7996e31ae..382ae819ebf 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -94,6 +94,7 @@ template <> struct ScalarEnumerationTraits<FormatStyle::BraceBreakingStyle> { static void enumeration(IO &IO, FormatStyle::BraceBreakingStyle &Value) { IO.enumCase(Value, "Attach", FormatStyle::BS_Attach); IO.enumCase(Value, "Linux", FormatStyle::BS_Linux); + IO.enumCase(Value, "Mozilla", FormatStyle::BS_Mozilla); IO.enumCase(Value, "Stroustrup", FormatStyle::BS_Stroustrup); IO.enumCase(Value, "Allman", FormatStyle::BS_Allman); IO.enumCase(Value, "GNU", FormatStyle::BS_GNU); @@ -483,6 +484,7 @@ FormatStyle getMozillaStyle() { MozillaStyle.AlwaysBreakAfterDefinitionReturnType = FormatStyle::DRTBS_TopLevel; MozillaStyle.AlwaysBreakTemplateDeclarations = true; + MozillaStyle.BreakBeforeBraces = FormatStyle::BS_Mozilla; MozillaStyle.BreakConstructorInitializersBeforeComma = true; MozillaStyle.ConstructorInitializerIndentWidth = 2; MozillaStyle.ContinuationIndentWidth = 2; |