summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2016-01-09 15:56:47 +0000
committerDaniel Jasper <djasper@google.com>2016-01-09 15:56:47 +0000
commit00693b08cf09af29bf3d0149538cfcf29bbf15a6 (patch)
tree9cda10b87a3c0d3c1502ab688a3400856bf91e65 /clang/unittests/Format
parent804a276fcf0e328fc96fedf7ef158b5b0d5ad422 (diff)
downloadbcm5719-llvm-00693b08cf09af29bf3d0149538cfcf29bbf15a6.tar.gz
bcm5719-llvm-00693b08cf09af29bf3d0149538cfcf29bbf15a6.zip
clang-format: Fix incorrect line break in certain configurations.
Before: void aaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaa, vector<int> bbbbbbbbbbbbbbb); After: void aaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaa, vector<int> bbbbbbbbbbbbbbb); llvm-svn: 257257
Diffstat (limited to 'clang/unittests/Format')
-rw-r--r--clang/unittests/Format/FormatTest.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 46773a306fd..fe673cc486c 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -4062,6 +4062,10 @@ TEST_F(FormatTest, FormatsDeclarationsOnePerLine) {
" int aaaaaaaaaaaaaaaaaaaa,\n"
" int aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) {}",
NoBinPacking);
+ NoBinPacking.AllowAllParametersOfDeclarationOnNextLine = false;
+ verifyFormat("void aaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaa,\n"
+ " vector<int> bbbbbbbbbbbbbbb);",
+ NoBinPacking);
}
TEST_F(FormatTest, FormatsOneParameterPerLineIfNecessary) {
OpenPOWER on IntegriCloud