aboutsummaryrefslogtreecommitdiff
path: root/lib/Format
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-02-18 11:59:17 +0000
committerDaniel Jasper <djasper@google.com>2013-02-18 11:59:17 +0000
commit66d19bdeef25611c9188b3f27b7d578df4b9a447 (patch)
treec86171c8fc6c4ccd0e9db104ba7a83e2e6d0b510 /lib/Format
parentcf5767d65a0ee64b22c242eb758e8684a6ea5a59 (diff)
Always break after multi-line string literals.
Otherwise, other parameters can be quite hidden. Reformatted unittests/Format/FormatTest.cpp after this. Before: someFunction("Always break between multi-line" " string literals", and, other, parameters); After: someFunction("Always break between multi-line" " string literals", and, other, parameters); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175436 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format')
-rw-r--r--lib/Format/Format.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp
index ee3516af0c..fa62752fe6 100644
--- a/lib/Format/Format.cpp
+++ b/lib/Format/Format.cpp
@@ -441,6 +441,7 @@ private:
} else if (Current.is(tok::string_literal) &&
Previous.is(tok::string_literal)) {
State.Column = State.Column - Previous.FormatTok.TokenLength;
+ State.Stack.back().BreakBeforeParameter = true;
} else if (Current.is(tok::lessless) &&
State.Stack.back().FirstLessLess != 0) {
State.Column = State.Stack.back().FirstLessLess;