diff options
Diffstat (limited to 'lib/Format/UnwrappedLineParser.cpp')
-rw-r--r-- | lib/Format/UnwrappedLineParser.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Format/UnwrappedLineParser.cpp b/lib/Format/UnwrappedLineParser.cpp index 5af60a47c5..76e912cca5 100644 --- a/lib/Format/UnwrappedLineParser.cpp +++ b/lib/Format/UnwrappedLineParser.cpp @@ -784,7 +784,7 @@ void UnwrappedLineParser::flushComments(bool NewlineBeforeNext) { I = CommentsBeforeNextToken.begin(), E = CommentsBeforeNextToken.end(); I != E; ++I) { - if (I->HasUnescapedNewline && JustComments) { + if (I->NewlinesBefore && JustComments) { addUnwrappedLine(); } pushToken(*I); @@ -798,7 +798,7 @@ void UnwrappedLineParser::flushComments(bool NewlineBeforeNext) { void UnwrappedLineParser::nextToken() { if (eof()) return; - flushComments(FormatTok.HasUnescapedNewline); + flushComments(FormatTok.NewlinesBefore > 0); pushToken(FormatTok); readToken(); } @@ -819,7 +819,7 @@ void UnwrappedLineParser::readToken() { } if (!FormatTok.Tok.is(tok::comment)) return; - if (FormatTok.HasUnescapedNewline || FormatTok.IsFirst) { + if (FormatTok.NewlinesBefore > 0 || FormatTok.IsFirst) { CommentsInCurrentLine = false; } if (CommentsInCurrentLine) { |