summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/TokenAnnotator.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2015-09-15 23:48:17 +0000
committerNico Weber <nicolasweber@gmx.de>2015-09-15 23:48:17 +0000
commit4f11349028c331799498cd7aaa70585b33fc031c (patch)
tree1eaf39636f80be82d4f8f638ec18ffdeb770b471 /clang/lib/Format/TokenAnnotator.cpp
parent8a5526e8bedab4508d1ed291fd561cf693a8295a (diff)
downloadbcm5719-llvm-4f11349028c331799498cd7aaa70585b33fc031c.tar.gz
bcm5719-llvm-4f11349028c331799498cd7aaa70585b33fc031c.zip
clang-format: In Java, `assert` is followed by an expression.
Before: assert a&& b; Now: assert a && b; llvm-svn: 247750
Diffstat (limited to 'clang/lib/Format/TokenAnnotator.cpp')
-rw-r--r--clang/lib/Format/TokenAnnotator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp
index 5dad651bd96..53027c79b36 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -860,7 +860,7 @@ private:
Contexts.back().IsExpression = true;
} else if (Current.is(TT_TrailingReturnArrow)) {
Contexts.back().IsExpression = false;
- } else if (Current.is(TT_LambdaArrow)) {
+ } else if (Current.is(TT_LambdaArrow) || Current.is(Keywords.kw_assert)) {
Contexts.back().IsExpression = Style.Language == FormatStyle::LK_Java;
} else if (Current.is(tok::l_paren) && !Line.MustBeDeclaration &&
!Line.InPPDirective &&
OpenPOWER on IntegriCloud