summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/BreakableToken.cpp
diff options
context:
space:
mode:
authorManuel Klimek <klimek@google.com>2017-11-14 09:19:53 +0000
committerManuel Klimek <klimek@google.com>2017-11-14 09:19:53 +0000
commit45ab559ee7b1586b12cf6b81480003ba4d80c295 (patch)
treef116a0fe745c332cd389447cb0319cc88c75e039 /clang/lib/Format/BreakableToken.cpp
parent926b95c4dd9c49fbec7f4a0b5ce1cfdfa588520a (diff)
downloadbcm5719-llvm-45ab559ee7b1586b12cf6b81480003ba4d80c295.tar.gz
bcm5719-llvm-45ab559ee7b1586b12cf6b81480003ba4d80c295.zip
Refactor ContinuationIndenter's breakProtrudingToken logic.
Create more orthogonal pieces. The restructuring made it easy to try out several alternatives to D33589, and while none of the alternatives turned out to be the right solution, the underlying simplification of the structure is helpful. Differential Revision: https://reviews.llvm.org/D39900 llvm-svn: 318141
Diffstat (limited to 'clang/lib/Format/BreakableToken.cpp')
-rw-r--r--clang/lib/Format/BreakableToken.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Format/BreakableToken.cpp b/clang/lib/Format/BreakableToken.cpp
index ad1ec9f8ad2..67d75fd696b 100644
--- a/clang/lib/Format/BreakableToken.cpp
+++ b/clang/lib/Format/BreakableToken.cpp
@@ -749,6 +749,7 @@ BreakableLineCommentSection::BreakableLineCommentSection(
Prefix.resize(Lines.size());
OriginalPrefix.resize(Lines.size());
for (size_t i = FirstLineIndex, e = Lines.size(); i < e; ++i) {
+ Lines[i] = Lines[i].ltrim(Blanks);
// We need to trim the blanks in case this is not the first line in a
// multiline comment. Then the indent is included in Lines[i].
StringRef IndentPrefix =
OpenPOWER on IntegriCloud