[PATCH] D30705: clang-format: [JS] allow breaking after non-null assertions.

Martin Probst via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 8 02:03:31 PST 2017


mprobst marked 2 inline comments as done.
mprobst added inline comments.


================
Comment at: lib/Format/TokenAnnotator.cpp:1056
+    } else if (Current.is(tok::exclaim)) {
+      if (Style.Language == FormatStyle::LK_JavaScript) {
+        if (Current.Previous &&
----------------
djasper wrote:
> I wonder whether we should do this logic "inside out", i.e. have language-specific parts at the top (or in a separate function). We have started that in mustBreakBefore and I think that's helpful.
> 
> I can do this in a follow-up, though.
Yeah, I was debating that but wanted to stick with the code style. Done.


https://reviews.llvm.org/D30705





More information about the cfe-commits mailing list