diff options
author | Daniel Jasper <djasper@google.com> | 2013-08-30 07:12:40 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-08-30 07:12:40 +0000 |
commit | f8151e9bc1e91432739e8dd86b1c532451b28dc1 (patch) | |
tree | 1b8605c363af9d57b45cc7b047c78857aec21d63 /clang/lib/Format/ContinuationIndenter.cpp | |
parent | 48a5d69ee18961d4be8bfd37071a50e6a4bee70f (diff) | |
download | bcm5719-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.cpp | 4 |
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; } |