summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/ContinuationIndenter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Format/ContinuationIndenter.cpp')
-rw-r--r--clang/lib/Format/ContinuationIndenter.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/Format/ContinuationIndenter.cpp b/clang/lib/Format/ContinuationIndenter.cpp
index bf075ab6d53..5a30370af86 100644
--- a/clang/lib/Format/ContinuationIndenter.cpp
+++ b/clang/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;
OpenPOWER on IntegriCloud