summaryrefslogtreecommitdiffstats
path: root/lib/Format/ContinuationIndenter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Format/ContinuationIndenter.cpp')
-rw-r--r--lib/Format/ContinuationIndenter.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Format/ContinuationIndenter.cpp b/lib/Format/ContinuationIndenter.cpp
index bf075ab6d5..5a30370af8 100644
--- a/lib/Format/ContinuationIndenter.cpp
+++ b/lib/Format/ContinuationIndenter.cpp
@@ -930,6 +930,13 @@ void ContinuationIndenter::moveStatePastScopeOpener(LineState &State,
return;
}
+ const FormatToken *Previous = Current.getPreviousNonComment();
+ if (Previous && Previous->is(tok::comma) &&
+ !Previous->is(TT_OverloadedOperator)) {
+ if (!Newline)
+ State.Stack.back().NoLineBreak = true;
+ }
+
unsigned NewIndent;
unsigned NewIndentLevel = State.Stack.back().IndentLevel;
unsigned LastSpace = State.Stack.back().LastSpace;