summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/ContinuationIndenter.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2015-06-05 13:18:09 +0000
committerDaniel Jasper <djasper@google.com>2015-06-05 13:18:09 +0000
commit6f2b88a39838fa46b222e506c9407f1cc31feeb3 (patch)
tree61a1bec3b1db472003d537983987a0e4ec693203 /clang/lib/Format/ContinuationIndenter.cpp
parentf6a1312f1b30a335889f74d92e5ce5e5a6970f4a (diff)
downloadbcm5719-llvm-6f2b88a39838fa46b222e506c9407f1cc31feeb3.tar.gz
bcm5719-llvm-6f2b88a39838fa46b222e506c9407f1cc31feeb3.zip
clang-format: More eagerly wrap trailing return types.
Before: template <typename T> auto aaaaaaaaaaaaaaaaaaaaaa(T t) -> decltype(eaaaaaaaaaaaaaaa<T>(t.a) .aaaaaaaa()); After: template <typename T> auto aaaaaaaaaaaaaaaaaaaaaa(T t) -> decltype(eaaaaaaaaaaaaaaa<T>(t.a).aaaaaaaa()); Also add a test case for a difficult template parsing case I stumbled accross. Needs fixing. llvm-svn: 239149
Diffstat (limited to 'clang/lib/Format/ContinuationIndenter.cpp')
-rw-r--r--clang/lib/Format/ContinuationIndenter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Format/ContinuationIndenter.cpp b/clang/lib/Format/ContinuationIndenter.cpp
index 10a716c551b..91bc64b2b8b 100644
--- a/clang/lib/Format/ContinuationIndenter.cpp
+++ b/clang/lib/Format/ContinuationIndenter.cpp
@@ -329,7 +329,7 @@ void ContinuationIndenter::addTokenOnCurrentLine(LineState &State, bool DryRun,
State.Column > getNewLineColumn(State))
State.Stack.back().ContainsUnwrappedBuilder = true;
- if (Current.is(TT_LambdaArrow))
+ if (Current.is(TT_LambdaArrow) && Style.Language == FormatStyle::LK_Java)
State.Stack.back().NoLineBreak = true;
if (Current.isMemberAccess() && Previous.is(tok::r_paren) &&
(Previous.MatchingParen &&
OpenPOWER on IntegriCloud