summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/ContinuationIndenter.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2014-11-03 02:27:28 +0000
committerDaniel Jasper <djasper@google.com>2014-11-03 02:27:28 +0000
commit39af6cd5a40e20f99b03e028942ae55ff7323683 (patch)
tree01627c8a7ea4022bed7aa0ee3d99d18bbbe8cea0 /clang/lib/Format/ContinuationIndenter.cpp
parentfcd556074c03ab47fe809e1f94fc78a3b3fe94dd (diff)
downloadbcm5719-llvm-39af6cd5a40e20f99b03e028942ae55ff7323683.tar.gz
bcm5719-llvm-39af6cd5a40e20f99b03e028942ae55ff7323683.zip
clang-format: [Java] Fix class declaration formatting.
Before: @SomeAnnotation() abstract class aaaaaaaaaaaa extends bbbbbbbbbbbbbbb implements cccccccccccc { } After: @SomeAnnotation() abstract class aaaaaaaaaaaa extends bbbbbbbbbbbbbbb implements cccccccccccc { } llvm-svn: 221121
Diffstat (limited to 'clang/lib/Format/ContinuationIndenter.cpp')
-rw-r--r--clang/lib/Format/ContinuationIndenter.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Format/ContinuationIndenter.cpp b/clang/lib/Format/ContinuationIndenter.cpp
index 707153242b8..f6fbbba440e 100644
--- a/clang/lib/Format/ContinuationIndenter.cpp
+++ b/clang/lib/Format/ContinuationIndenter.cpp
@@ -428,7 +428,9 @@ unsigned ContinuationIndenter::addTokenOnNewLine(LineState &State,
!State.Stack.back().AvoidBinPacking) ||
Previous.Type == TT_BinaryOperator)
State.Stack.back().BreakBeforeParameter = false;
- if (Previous.Type == TT_TemplateCloser && Current.NestingLevel == 0)
+ if ((Previous.Type == TT_TemplateCloser ||
+ Previous.Type == TT_JavaAnnotation) &&
+ Current.NestingLevel == 0)
State.Stack.back().BreakBeforeParameter = false;
if (NextNonComment->is(tok::question) ||
(PreviousNonComment && PreviousNonComment->is(tok::question)))
OpenPOWER on IntegriCloud