mprobst added inline comments. ================ Comment at: lib/Format/TokenAnnotator.cpp:2384 @@ -2383,2 +2383,3 @@ } else if (Style.Language == FormatStyle::LK_JavaScript) { - if (Left.is(tok::kw_return)) + const FormatToken *NonComment = Right.getPreviousNonComment(); + if (Left.isOneOf(tok::kw_return, tok::kw_continue, tok::kw_break, ---------------- Should the entire method generally consider the previous non-comment, instead of just the previous token? Not sure if that makes sense in all cases, and I don't think we always have a previous non-comment token either.
https://reviews.llvm.org/D24257 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits