[PATCH] D28165: Change clang-format's Chromium JavaScript defaults

Dan Beam via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 3 18:27:48 PST 2017


danbeam updated this revision to Diff 82989.
danbeam marked an inline comment as done.
danbeam added a comment.

setting up arc


https://reviews.llvm.org/D28165

Files:
  lib/Format/Format.cpp


Index: lib/Format/Format.cpp
===================================================================
--- lib/Format/Format.cpp
+++ lib/Format/Format.cpp
@@ -638,6 +638,9 @@
     ChromiumStyle.BreakAfterJavaFieldAnnotations = true;
     ChromiumStyle.ContinuationIndentWidth = 8;
     ChromiumStyle.IndentWidth = 4;
+  } else if (Language == FormatStyle::LK_JavaScript) {
+    ChromiumStyle.AllowShortIfStatementsOnASingleLine = false;
+    ChromiumStyle.AllowShortLoopsOnASingleLine = false;
   } else {
     ChromiumStyle.AllowAllParametersOfDeclarationOnNextLine = false;
     ChromiumStyle.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Inline;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28165.82989.patch
Type: text/x-patch
Size: 649 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170104/869099d2/attachment.bin>


More information about the cfe-commits mailing list