[PATCH] clang-format: [JS] support cast syntax and type arguments.

Daniel Jasper djasper at google.com
Sun Mar 15 06:53:17 PDT 2015


Please upload patch with full context in the future. Phabricator can't/doesn't access the existing repository to get the context.


================
Comment at: lib/Format/TokenAnnotator.cpp:1760
@@ -1759,1 +1759,3 @@
     return false;
+  if (Left.is(TT_TemplateCloser) &&
+      Style.Language == FormatStyle::LK_JavaScript &&
----------------
So, there is a of spaceRequiredBefore and spaceRequiredBetween. It is entirely historic, not logical, essentially those two are just in sequence. However, I'd prefer to move this to spaceRequiredBefore, which has a JavaScript-specific section at the top.

http://reviews.llvm.org/D8333

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list