summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format
diff options
context:
space:
mode:
authorMartin Probst <martin@probst.io>2017-04-26 12:34:18 +0000
committerMartin Probst <martin@probst.io>2017-04-26 12:34:18 +0000
commit07a0307a407e7349c065a206c4fdb40396a57bde (patch)
tree51263a9096cfbcfc3f6c9c92cb027ba4f3f62a4b /clang/lib/Format
parent19c7de0a2262da2da139c7ddd7978cecdef1ffae (diff)
downloadbcm5719-llvm-07a0307a407e7349c065a206c4fdb40396a57bde.tar.gz
bcm5719-llvm-07a0307a407e7349c065a206c4fdb40396a57bde.zip
formatting
llvm-svn: 301398
Diffstat (limited to 'clang/lib/Format')
-rw-r--r--clang/lib/Format/TokenAnnotator.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp
index 86380c6e6f1..679b73ffa90 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -2541,13 +2541,11 @@ 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,
- Keywords.kw_type, tok::kw_static, tok::kw_public,
- tok::kw_private, tok::kw_protected,
- Keywords.kw_abstract,
- Keywords.kw_get,
- Keywords.kw_set))
+ NonComment->isOneOf(
+ tok::kw_return, 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_abstract, Keywords.kw_get, Keywords.kw_set))
return false; // Otherwise a semicolon is inserted.
if (Left.is(TT_JsFatArrow) && Right.is(tok::l_brace))
return false;
OpenPOWER on IntegriCloud