summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/TokenAnnotator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Format/TokenAnnotator.cpp')
-rw-r--r--clang/lib/Format/TokenAnnotator.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp
index 6f6f468c2ae..67a0fa892d5 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -967,8 +967,9 @@ void TokenAnnotator::calculateFormattingInformation(AnnotatedLine &Line) {
Current->is(tok::string_literal) &&
Current->Previous->isNot(tok::lessless) &&
Current->Previous->Type != TT_InlineASMColon &&
- Current->getNextNonComment() &&
- Current->getNextNonComment()->is(tok::string_literal)) {
+ ((Current->getNextNonComment() &&
+ Current->getNextNonComment()->is(tok::string_literal)) ||
+ (Current->TokenText.find("\\\n") != StringRef::npos))) {
Current->MustBreakBefore = true;
}
Current->CanBreakBefore =
OpenPOWER on IntegriCloud