diff options
author | Manuel Klimek <klimek@google.com> | 2017-11-14 09:19:53 +0000 |
---|---|---|
committer | Manuel Klimek <klimek@google.com> | 2017-11-14 09:19:53 +0000 |
commit | bf29fe4665de7cdc5686068f13fe0904f81b99c7 (patch) | |
tree | f9799c6d53851387ef75887f18150f521bb830b2 /lib/Format/BreakableToken.cpp | |
parent | 93556e376b123243b8118325279c1f3c3b4d2582 (diff) |
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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@318141 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/BreakableToken.cpp')
-rw-r--r-- | lib/Format/BreakableToken.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Format/BreakableToken.cpp b/lib/Format/BreakableToken.cpp index ad1ec9f8ad..67d75fd696 100644 --- a/lib/Format/BreakableToken.cpp +++ b/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 = |