This revision was automatically updated to reflect the committed changes.
Closed by commit rL280730: clang-format: [JS] ignore comments when wrapping
returns. (authored by mprobst).
Changed prior to commit:
https://reviews.llvm.org/D24257?vs=70405=70444#toc
Repository:
rL LLVM
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good.
Comment at: lib/Format/TokenAnnotator.cpp:2384
@@ -2383,2 +2383,3 @@
} else if (Style.Language == FormatStyle::LK_JavaScript) {
-if
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