diff options
Diffstat (limited to 'clang/lib/Format/TokenAnnotator.cpp')
| -rw-r--r-- | clang/lib/Format/TokenAnnotator.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index ac7301eebd0..2bce7c0f349 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -266,7 +266,7 @@ private: } return true; } - + void updateParameterCount(AnnotatedToken *Left, AnnotatedToken *Current) { if (Current->is(tok::comma)) ++Left->ParameterCount; @@ -835,6 +835,8 @@ void TokenAnnotator::calculateFormattingInformation(AnnotatedLine &Line) { Current->Parent->is(tok::string_literal) && Current->Children[0].is(tok::string_literal)) { Current->MustBreakBefore = true; + } else if (Current->FormatTok.NewlinesBefore > 1) { + Current->MustBreakBefore = true; } else { Current->MustBreakBefore = false; } |

