diff options
author | Daniel Jasper <djasper@google.com> | 2015-05-06 14:23:38 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2015-05-06 14:23:38 +0000 |
commit | e92bf6f14178e24c2be4812ddb772b01995f9c79 (patch) | |
tree | 5dcf91f114d024a8a180764cb39aea0e2f583093 /clang/unittests/Format/FormatTest.cpp | |
parent | e452998b4bbda07a4ba22b034a109daa90d7519e (diff) | |
download | bcm5719-llvm-e92bf6f14178e24c2be4812ddb772b01995f9c79.tar.gz bcm5719-llvm-e92bf6f14178e24c2be4812ddb772b01995f9c79.zip |
clang-format: Consider operator precedence as penalty when breaking
before operators.
This fixes llvm.org/23382.
llvm-svn: 236602
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 9173061c978..cb1f7bd539f 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -3500,6 +3500,10 @@ TEST_F(FormatTest, ExpressionIndentationBreakingBeforeOperators) { " + cc;", Style); + verifyFormat("aaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n" + " = aaaaaaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaaaaaaaaaaaaaa;", + Style); + // Forced by comments. verifyFormat( "unsigned ContentSize =\n" |