From 18bd7cce0dd8c7aa2691bff008c4035e96bd9bb6 Mon Sep 17 00:00:00 2001 From: Birunthan Mohanathas Date: Mon, 29 Jun 2015 15:18:58 +0000 Subject: [PATCH] clang-format: Adjust Mozilla style defaults 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 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp index 6a8a848082..edc44d3e3d 100644 --- a/lib/Format/Format.cpp +++ b/lib/Format/Format.cpp @@ -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; } -- 2.50.1