[PATCH] Update Mozilla Style

Anthony Jones ajones at mozilla.com
Thu Jan 23 17:47:19 PST 2014


Hi djasper,

Update Mozilla style to more closely match the official Mozilla guidelines

http://llvm-reviews.chandlerc.com/D2610

Files:
  lib/Format/Format.cpp

Index: lib/Format/Format.cpp
===================================================================
--- lib/Format/Format.cpp
+++ lib/Format/Format.cpp
@@ -336,12 +336,16 @@
 FormatStyle getMozillaStyle() {
   FormatStyle MozillaStyle = getLLVMStyle();
   MozillaStyle.AllowAllParametersOfDeclarationOnNextLine = false;
+  MozillaStyle.BreakConstructorInitializersBeforeComma = true;
   MozillaStyle.ConstructorInitializerAllOnOneLineOrOnePerLine = true;
+  MozillaStyle.ConstructorInitializerIndentWidth = 2;
   MozillaStyle.DerivePointerBinding = true;
   MozillaStyle.IndentCaseLabels = true;
   MozillaStyle.ObjCSpaceBeforeProtocolList = false;
   MozillaStyle.PenaltyReturnTypeOnItsOwnLine = 200;
   MozillaStyle.PointerBindsToType = true;
+  MozillaStyle.ContinuationIndentWidth = 2;
+  MozillaStyle.BreakBeforeBraces = FormatStyle::BS_Linux;
   return MozillaStyle;
 }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2610.1.patch
Type: text/x-patch
Size: 875 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140123/d290815f/attachment.bin>


More information about the cfe-commits mailing list