This revision was automatically updated to reflect the committed changes.
Closed by commit rL273619: clang-format: [JS] handle conditionals in fields,
default params. (authored by mprobst).
Changed prior to commit:
http://reviews.llvm.org/D21658?vs=61726&id=61729#toc
Repository:
rL LLVM
htt
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good except that the patch description can now be updated.
http://reviews.llvm.org/D21658
___
cfe-commits mailing list
cfe-commits@lists.
mprobst updated this revision to Diff 61726.
mprobst added a comment.
ok
http://reviews.llvm.org/D21658
Files:
lib/Format/TokenAnnotator.cpp
unittests/Format/FormatTestJS.cpp
Index: unittests/Format/FormatTestJS.cpp
===
--- un
djasper added inline comments.
Comment at: lib/Format/TokenAnnotator.cpp:1001
@@ -1000,3 +1000,3 @@
if (Style.Language == FormatStyle::LK_JavaScript &&
- Line.MustBeDeclaration) {
+ !Contexts.back().IsExpression) {
// In JavaScript, `interface X {
mprobst created this revision.
mprobst added a reviewer: djasper.
mprobst added a subscriber: cfe-commits.
Herald added a subscriber: klimek.
This causes a regression for top level ternary expressions, but that's deemed
acceptable, as those really should be very rare.
http://reviews.llvm.org/D216