diff options
author | Martin Probst <martin@probst.io> | 2017-11-24 17:05:35 +0000 |
---|---|---|
committer | Martin Probst <martin@probst.io> | 2017-11-24 17:05:35 +0000 |
commit | a5968aad3da0407ff7aaae3a47f665ea7daac709 (patch) | |
tree | 450e2a771f0ae9476d7ee3e306ab2154610559e0 /clang/lib/Format/TokenAnnotator.cpp | |
parent | a2555114b676a97d8306c895fa12a2a366e9d739 (diff) | |
download | bcm5719-llvm-a5968aad3da0407ff7aaae3a47f665ea7daac709.tar.gz bcm5719-llvm-a5968aad3da0407ff7aaae3a47f665ea7daac709.zip |
clang-format: [JS] do not wrap before yield.
Summary: The same rules apply as for `return`.
Reviewers: djasper
Subscribers: klimek
Differential Revision: https://reviews.llvm.org/D40431
llvm-svn: 318958
Diffstat (limited to 'clang/lib/Format/TokenAnnotator.cpp')
-rw-r--r-- | clang/lib/Format/TokenAnnotator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index 1962ab2ab99..d8d8bcbfc17 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -2699,8 +2699,8 @@ bool TokenAnnotator::canBreakBefore(const AnnotatedLine &Line, } else if (Style.Language == FormatStyle::LK_JavaScript) { const FormatToken *NonComment = Right.getPreviousNonComment(); if (NonComment && - NonComment->isOneOf(tok::kw_return, tok::kw_continue, tok::kw_break, - tok::kw_throw, Keywords.kw_interface, + NonComment->isOneOf(tok::kw_return, Keywords.kw_yield, tok::kw_continue, + tok::kw_break, tok::kw_throw, Keywords.kw_interface, Keywords.kw_type, tok::kw_static, tok::kw_public, tok::kw_private, tok::kw_protected, Keywords.kw_readonly, Keywords.kw_abstract, |