summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/Format.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r--clang/lib/Format/Format.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index 87c2fd70aee..86619270b36 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/lib/Format/Format.cpp
@@ -455,13 +455,12 @@ public:
/// \brief Formats the line starting at \p State, simply keeping all of the
/// input's line breaking decisions.
- void format(unsigned FirstIndent, const AnnotatedLine *Line,
- bool LineIsMerged) {
+ void format(unsigned FirstIndent, const AnnotatedLine *Line) {
LineState State =
Indenter->getInitialState(FirstIndent, Line, /*DryRun=*/false);
while (State.NextToken != NULL) {
bool Newline =
- (!LineIsMerged && Indenter->mustBreak(State)) ||
+ Indenter->mustBreak(State) ||
(Indenter->canBreak(State) && State.NextToken->NewlinesBefore > 0);
Indenter->addTokenToState(State, Newline, /*DryRun=*/false);
}
@@ -728,8 +727,7 @@ public:
// FIXME: Implement nested blocks for ColumnLimit = 0.
NoColumnLimitFormatter Formatter(Indenter);
if (!DryRun)
- Formatter.format(Indent, &TheLine,
- /*LineIsMerged=*/MergedLines > 0);
+ Formatter.format(Indent, &TheLine);
} else {
Penalty += format(TheLine, Indent, DryRun);
}
OpenPOWER on IntegriCloud