diff options
author | Daniel Jasper <djasper@google.com> | 2013-02-18 11:59:17 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-02-18 11:59:17 +0000 |
commit | 2ec3ffb86ea94d51b0ed80f3d66e319f2f4bcecc (patch) | |
tree | 5ee00d8bd817360366b109813aeab026bf48c5f7 /clang/lib/Format/Format.cpp | |
parent | 1c82f3eebda1385f03cc0199dd0dccb71fb583d5 (diff) | |
download | bcm5719-llvm-2ec3ffb86ea94d51b0ed80f3d66e319f2f4bcecc.tar.gz bcm5719-llvm-2ec3ffb86ea94d51b0ed80f3d66e319f2f4bcecc.zip |
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);
llvm-svn: 175436
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r-- | clang/lib/Format/Format.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index ee3516af0c8..fa62752fe63 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/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; |