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.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/Format/ContinuationIndenter.cpp b/clang/lib/Format/ContinuationIndenter.cpp
index 5e63d0cb9be..308fc623d82 100644
--- a/clang/lib/Format/ContinuationIndenter.cpp
+++ b/clang/lib/Format/ContinuationIndenter.cpp
@@ -413,10 +413,8 @@ unsigned ContinuationIndenter::addTokenOnNewLine(LineState &State,
State.Stack.back().BreakBeforeParameter = true;
if (!DryRun) {
- unsigned Newlines = 1;
- if (Current.is(tok::comment))
- Newlines = std::max(Newlines, std::min(Current.NewlinesBefore,
- Style.MaxEmptyLinesToKeep + 1));
+ unsigned Newlines = std::max(
+ 1u, std::min(Current.NewlinesBefore, Style.MaxEmptyLinesToKeep + 1));
Whitespaces.replaceWhitespace(Current, Newlines,
State.Stack.back().IndentLevel, State.Column,
State.Column, State.Line->InPPDirective);
OpenPOWER on IntegriCloud