From 2ec3ffb86ea94d51b0ed80f3d66e319f2f4bcecc Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Mon, 18 Feb 2013 11:59:17 +0000 Subject: 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 --- clang/lib/Format/Format.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'clang/lib/Format/Format.cpp') 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; -- cgit v1.2.3