[PATCH] D27557: Update the default of the Mozilla coding style

Sylvestre Ledru via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 7 18:06:44 PST 2016


sylvestre.ledru created this revision.
sylvestre.ledru added a reviewer: klimek.
sylvestre.ledru added a subscriber: cfe-commits.

I also proposed the change in Firefox .clang-format file:
https://bugzilla.mozilla.org/show_bug.cgi?id=1322321


https://reviews.llvm.org/D27557

Files:
  lib/Format/Format.cpp


Index: lib/Format/Format.cpp
===================================================================
--- lib/Format/Format.cpp
+++ lib/Format/Format.cpp
@@ -652,10 +652,12 @@
   MozillaStyle.AllowAllParametersOfDeclarationOnNextLine = false;
   MozillaStyle.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Inline;
   MozillaStyle.AlwaysBreakAfterReturnType =
-      FormatStyle::RTBS_TopLevelDefinitions;
+      FormatStyle::RTBS_TopLevel;;
   MozillaStyle.AlwaysBreakAfterDefinitionReturnType =
       FormatStyle::DRTBS_TopLevel;
   MozillaStyle.AlwaysBreakTemplateDeclarations = true;
+  MozillaStyle.BinPackParameters = false;
+  MozillaStyle.BinPackArguments = false;
   MozillaStyle.BreakBeforeBraces = FormatStyle::BS_Mozilla;
   MozillaStyle.BreakConstructorInitializersBeforeComma = true;
   MozillaStyle.ConstructorInitializerIndentWidth = 2;
@@ -667,6 +669,7 @@
   MozillaStyle.PenaltyReturnTypeOnItsOwnLine = 200;
   MozillaStyle.PointerAlignment = FormatStyle::PAS_Left;
   MozillaStyle.SpaceAfterTemplateKeyword = false;
+  MozillaStyle.ReflowComments = false;
   return MozillaStyle;
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27557.80701.patch
Type: text/x-patch
Size: 1104 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161208/f9711b71/attachment.bin>


More information about the cfe-commits mailing list