summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2015-06-29 10:42:59 +0000
committerDaniel Jasper <djasper@google.com>2015-06-29 10:42:59 +0000
commit2ce34c5ced21694ffe6c544834bea75db9b7e728 (patch)
treeafafd98bb2e8faede08f06e8d0ea7e422fa499bd /unittests
parent057d26469a69e5ca9a52d212092ce2c8f4f43a7d (diff)
downloadclang-2ce34c5ced21694ffe6c544834bea75db9b7e728.tar.gz
clang-format: Don't indent relative to unary operators (some more).
Before: long aaaaaaaa = !aaaa( // break aaaaaa); long aaaaaaaa = !aa.aa( // break aaaaaa); After: long aaaaaaaa = !aaaa( // break aaaaaa); long aaaaaaaa = !aa.aa( // break aaaaaa); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240934 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/Format/FormatTest.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index 445b5a941a..6b8bff167a 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -3921,10 +3921,12 @@ TEST_F(FormatTest, BreaksDesireably) {
" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,\n"
" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);");
- // Indent consistently independent of call expression.
+ // Indent consistently independent of call expression and unary operator.
+ verifyFormat("aaaaaaaaaaa(bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb(\n"
+ " dddddddddddddddddddddddddddddd));");
+ verifyFormat("aaaaaaaaaaa(!bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb(\n"
+ " dddddddddddddddddddddddddddddd));");
verifyFormat("aaaaaaaaaaa(bbbbbbbbbbbbbbbbbbbbbbbbb.ccccccccccccccccc(\n"
- " dddddddddddddddddddddddddddddd));\n"
- "aaaaaaaaaaa(bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb(\n"
" dddddddddddddddddddddddddddddd));");
// This test case breaks on an incorrect memoization, i.e. an optimization not
@@ -5190,7 +5192,7 @@ TEST_F(FormatTest, DoesNotIndentRelativeToUnaryOperators) {
" aaaaa)) {\n"
"}");
verifyFormat("aaaaaaaaaa(!aaaaaaaaaa( // break\n"
- " aaaaa));");
+ " aaaaa));");
verifyFormat("*aaa = aaaaaaa( // break\n"
" bbbbbb);");
}