diff options
Diffstat (limited to 'clang/lib/Format/TokenAnnotator.cpp')
-rw-r--r-- | clang/lib/Format/TokenAnnotator.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index 67a0fa892d5..021fd2488bb 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -963,18 +963,12 @@ void TokenAnnotator::calculateFormattingInformation(AnnotatedLine &Line) { } else if (Current->Previous->ClosesTemplateDeclaration && Style.AlwaysBreakTemplateDeclarations) { Current->MustBreakBefore = true; - } else if (Style.AlwaysBreakBeforeMultilineStrings && - Current->is(tok::string_literal) && - Current->Previous->isNot(tok::lessless) && - Current->Previous->Type != TT_InlineASMColon && - ((Current->getNextNonComment() && - Current->getNextNonComment()->is(tok::string_literal)) || - (Current->TokenText.find("\\\n") != StringRef::npos))) { - Current->MustBreakBefore = true; } Current->CanBreakBefore = Current->MustBreakBefore || canBreakBefore(Line, *Current); - if (Current->MustBreakBefore) + if (Current->MustBreakBefore || + (Current->is(tok::string_literal) && + Current->TokenText.find("\\\n") != StringRef::npos)) Current->TotalLength = Current->Previous->TotalLength + Style.ColumnLimit; else Current->TotalLength = Current->Previous->TotalLength + |