summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/ContinuationIndenter.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-08-30 07:12:40 +0000
committerDaniel Jasper <djasper@google.com>2013-08-30 07:12:40 +0000
commitf8151e9bc1e91432739e8dd86b1c532451b28dc1 (patch)
tree1b8605c363af9d57b45cc7b047c78857aec21d63 /clang/lib/Format/ContinuationIndenter.cpp
parent48a5d69ee18961d4be8bfd37071a50e6a4bee70f (diff)
downloadbcm5719-llvm-f8151e9bc1e91432739e8dd86b1c532451b28dc1.tar.gz
bcm5719-llvm-f8151e9bc1e91432739e8dd86b1c532451b28dc1.zip
clang-format: Fix corner case in builder-type calls.
Before: aaaaaaaaaaaaa->aaaaaaaaaaaaaaaaaaaaaaaa()->aaaaaaaaaaaaaae( 0)->aaaaaaaaaaaaaaa(); After: aaaaaaaaaaaaa->aaaaaaaaaaaaaaaaaaaaaaaa() ->aaaaaaaaaaaaaae(0) ->aaaaaaaaaaaaaaa(); llvm-svn: 189655
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 718e4a5cdef..10295197240 100644
--- a/clang/lib/Format/ContinuationIndenter.cpp
+++ b/clang/lib/Format/ContinuationIndenter.cpp
@@ -187,7 +187,9 @@ bool ContinuationIndenter::mustBreak(const LineState &State) {
State.ParenLevel == 0)
return true;
if (startsSegmentOfBuilderTypeCall(Current) &&
- State.Stack.back().CallContinuation != 0)
+ (State.Stack.back().CallContinuation != 0 ||
+ (State.Stack.back().BreakBeforeParameter &&
+ State.Stack.back().ContainsUnwrappedBuilder)))
return true;
return false;
}
OpenPOWER on IntegriCloud