summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/BreakableToken.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Format/BreakableToken.cpp')
-rw-r--r--clang/lib/Format/BreakableToken.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Format/BreakableToken.cpp b/clang/lib/Format/BreakableToken.cpp
index 01317dbef3d..8672ece9b79 100644
--- a/clang/lib/Format/BreakableToken.cpp
+++ b/clang/lib/Format/BreakableToken.cpp
@@ -241,6 +241,9 @@ BreakableBlockComment::BreakableBlockComment(const FormatStyle &Style,
Lines[i] = Lines[i].substr(Offset);
LeadingWhitespace[i] += Offset;
}
+ // Exclude empty lines from the calculation of the left-most column.
+ if (Lines[i].empty())
+ continue;
IndentAtLineBreak = std::min<int>(IndentAtLineBreak, StartOfLineColumn[i]);
}
DEBUG({
OpenPOWER on IntegriCloud