summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/ContinuationIndenter.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-10-18 16:47:55 +0000
committerDaniel Jasper <djasper@google.com>2013-10-18 16:47:55 +0000
commit2436fe95ea9f8c92c74f9af55666eaf73caf372a (patch)
tree9b87079758055984f8daa49cc975a79afe4b47d9 /clang/lib/Format/ContinuationIndenter.cpp
parentd8c36d09b18d3103e91d66a4ec0a355d30f5a7f3 (diff)
downloadbcm5719-llvm-2436fe95ea9f8c92c74f9af55666eaf73caf372a.tar.gz
bcm5719-llvm-2436fe95ea9f8c92c74f9af55666eaf73caf372a.zip
clang-format: Don't force linebreak between return and multiline string.
This looks ugly and leads to llvm.org/PR17590. Before (with AlwaysBreakBeforeMultilineStrings): return "aaaa" "bbbb"; After: return "aaaa" "bbbb"; llvm-svn: 192984
Diffstat (limited to 'clang/lib/Format/ContinuationIndenter.cpp')
-rw-r--r--clang/lib/Format/ContinuationIndenter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Format/ContinuationIndenter.cpp b/clang/lib/Format/ContinuationIndenter.cpp
index b0bd13b69a3..0cf9e32ea84 100644
--- a/clang/lib/Format/ContinuationIndenter.cpp
+++ b/clang/lib/Format/ContinuationIndenter.cpp
@@ -133,8 +133,8 @@ bool ContinuationIndenter::mustBreak(const LineState &State) {
return true;
if (Style.AlwaysBreakBeforeMultilineStrings &&
State.Column > State.Stack.back().Indent && // Breaking saves columns.
- Previous.isNot(tok::lessless) && Previous.Type != TT_InlineASMColon &&
- NextIsMultilineString(State))
+ !Previous.isOneOf(tok::kw_return, tok::lessless) &&
+ Previous.Type != TT_InlineASMColon && NextIsMultilineString(State))
return true;
if (!Style.BreakBeforeBinaryOperators) {
OpenPOWER on IntegriCloud