summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2016-02-08 09:52:54 +0000
committerDaniel Jasper <djasper@google.com>2016-02-08 09:52:54 +0000
commit2a9f720129b8fcd9ffedf27cc2201e3f4e186ec7 (patch)
treedf7979b8596e24cbc663ad9be012e3ca97bfbf7a /clang/unittests/Format/FormatTest.cpp
parent08a70542b117610199aadc3c352049ea43b03632 (diff)
downloadbcm5719-llvm-2a9f720129b8fcd9ffedf27cc2201e3f4e186ec7.tar.gz
bcm5719-llvm-2a9f720129b8fcd9ffedf27cc2201e3f4e186ec7.zip
clang-format: Fix weird alignment when not aligning after brackets.
Before: bbbbbbbbbbbb(aaaaaaaaaaaaaaaaaaaaaaaa, // ccccccc(aaaaaaaaaaaaaaaaa, // b)); After: bbbbbbbbbbbb(aaaaaaaaaaaaaaaaaaaaaaaa, // ccccccc(aaaaaaaaaaaaaaaaa, // b)); This fixes llvm.org/PR24905. llvm-svn: 260080
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 0db5d9c89a1..8d541301a33 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -4434,6 +4434,11 @@ TEST_F(FormatTest, AlignsAfterOpenBracket) {
" aaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa));",
Style);
+ verifyFormat("bbbbbbbbbbbb(aaaaaaaaaaaaaaaaaaaaaaaa, //\n"
+ " ccccccc(aaaaaaaaaaaaaaaaa, //\n"
+ " b));",
+ Style);
+
Style.AlignAfterOpenBracket = FormatStyle::BAS_AlwaysBreak;
Style.BinPackArguments = false;
Style.BinPackParameters = false;
OpenPOWER on IntegriCloud