Hi,

This is my first llvm or clang patch so I apologise if I've missed some
step in the process. Currently clang-format's idea of Mozilla style is
substantially incorrect. This patch updates the Mozilla default to make
it more closely match the style used by Mozilla. There is further work
to do here.

Anthony
commit cd61ee980fcd0efbc55a153d58d461b081696cfd
Author: Anthony Jones <[email protected]>
Date:   Mon Jan 20 13:22:42 2014 +1300

    Update Mozilla style

diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp
index 2d03a30..4abaf75 100644
--- a/lib/Format/Format.cpp
+++ b/lib/Format/Format.cpp
@@ -336,12 +336,15 @@ FormatStyle getChromiumStyle() {
 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;
 }
 
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to