clang-format: Fix corner case in builder-type calls.
Before:
aaaaaaaaaaaaa->aaaaaaaaaaaaaaaaaaaaaaaa()->aaaaaaaaaaaaaae(
0)->aaaaaaaaaaaaaaa();
After:
aaaaaaaaaaaaa->aaaaaaaaaaaaaaaaaaaaaaaa()
->aaaaaaaaaaaaaae(0)
->aaaaaaaaaaaaaaa();
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189655 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Format/ContinuationIndenter.cpp b/lib/Format/ContinuationIndenter.cpp
index 718e4a5..1029519 100644
--- a/lib/Format/ContinuationIndenter.cpp
+++ b/lib/Format/ContinuationIndenter.cpp
@@ -187,7 +187,9 @@
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;
}