]> granicus.if.org Git - clang/commitdiff
clang-format: Adjust Mozilla style defaults
authorBirunthan Mohanathas <birunthan@mohanathas.com>
Mon, 29 Jun 2015 15:18:58 +0000 (15:18 +0000)
committerBirunthan Mohanathas <birunthan@mohanathas.com>
Mon, 29 Jun 2015 15:18:58 +0000 (15:18 +0000)
Summary: This makes the Mozilla style defaults more compliant with the Mozilla style guide. A few options were removed in order to use the LLVM style defaults.

Differential Revision: http://reviews.llvm.org/D10771

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240957 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Format/Format.cpp

index 6a8a8480823fbaef6e15127167379306ea1c71c6..edc44d3e3dfaf500b060350f88045bc8f8d8308b 100644 (file)
@@ -462,15 +462,17 @@ FormatStyle getChromiumStyle(FormatStyle::LanguageKind Language) {
 FormatStyle getMozillaStyle() {
   FormatStyle MozillaStyle = getLLVMStyle();
   MozillaStyle.AllowAllParametersOfDeclarationOnNextLine = false;
+  MozillaStyle.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Inline;
+  MozillaStyle.AlwaysBreakTemplateDeclarations = true;
+  MozillaStyle.BreakConstructorInitializersBeforeComma = true;
+  MozillaStyle.ConstructorInitializerIndentWidth = 2;
+  MozillaStyle.ContinuationIndentWidth = 2;
   MozillaStyle.Cpp11BracedListStyle = false;
-  MozillaStyle.ConstructorInitializerAllOnOneLineOrOnePerLine = true;
-  MozillaStyle.DerivePointerAlignment = true;
   MozillaStyle.IndentCaseLabels = true;
   MozillaStyle.ObjCSpaceAfterProperty = true;
   MozillaStyle.ObjCSpaceBeforeProtocolList = false;
   MozillaStyle.PenaltyReturnTypeOnItsOwnLine = 200;
   MozillaStyle.PointerAlignment = FormatStyle::PAS_Left;
-  MozillaStyle.Standard = FormatStyle::LS_Cpp03;
   return MozillaStyle;
 }