summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTestObjC.cpp
diff options
context:
space:
mode:
authorJacek Olesiak <jolesiak@google.com>2018-05-30 12:57:58 +0000
committerJacek Olesiak <jolesiak@google.com>2018-05-30 12:57:58 +0000
commitd8d5628834c7cda4a506a3c33105c8725b9b1762 (patch)
treed8c2197b1126775dccb7f843c331f305b024a4a4 /clang/unittests/Format/FormatTestObjC.cpp
parent28f048af9db8540fb3c4a6b1cd1770a0dbb6cc3b (diff)
downloadbcm5719-llvm-d8d5628834c7cda4a506a3c33105c8725b9b1762.tar.gz
bcm5719-llvm-d8d5628834c7cda4a506a3c33105c8725b9b1762.zip
Revert "[clang-format] Fix putting ObjC message arguments in one line for multiline receiver"
Summary: This reverts commit db9e5e9a616d7fdd4d1ba4c3b2cd89d8a0238533 (rC333171). Mentioned change introduced unintended formatting of ObjC code due to split priorities inherited from C/C++, e.g.: ``` fooooooo = [ [obj fooo] aaa:42 aaa:42]; ``` instead of ``` fooooooo = [[obj fooo] aaa:42 aaa:42]; ``` when formatted with ColumnLimit = 30. Reviewers: krasimir Reviewed By: krasimir Subscribers: benhamilton, klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D47527 llvm-svn: 333539
Diffstat (limited to 'clang/unittests/Format/FormatTestObjC.cpp')
-rw-r--r--clang/unittests/Format/FormatTestObjC.cpp35
1 files changed, 0 insertions, 35 deletions
diff --git a/clang/unittests/Format/FormatTestObjC.cpp b/clang/unittests/Format/FormatTestObjC.cpp
index 43510c42790..c29c9d702bc 100644
--- a/clang/unittests/Format/FormatTestObjC.cpp
+++ b/clang/unittests/Format/FormatTestObjC.cpp
@@ -796,41 +796,6 @@ TEST_F(FormatTestObjC, FormatObjCMethodExpr) {
verifyFormat("[((Foo *)foo) bar];");
verifyFormat("[((Foo *)foo) bar:1 blech:2];");
- // Message receiver taking multiple lines.
- Style.ColumnLimit = 20;
- // Non-corner case.
- verifyFormat("[[object block:^{\n"
- " return 42;\n"
- "}] a:42 b:42];");
- // Arguments just fit into one line.
- verifyFormat("[[object block:^{\n"
- " return 42;\n"
- "}] aaaaaaa:42 b:42];");
- // Arguments just over a column limit.
- verifyFormat("[[object block:^{\n"
- " return 42;\n"
- "}] aaaaaaa:42\n"
- " bb:42];");
- // Arguments just fit into one line.
- Style.ColumnLimit = 23;
- verifyFormat("[[obj a:42\n"
- " b:42\n"
- " c:42\n"
- " d:42] e:42 f:42];");
-
- // Arguments do not fit into one line with a receiver.
- Style.ColumnLimit = 20;
- verifyFormat("[[obj a:42] a:42\n"
- " b:42];");
- verifyFormat("[[obj a:42] a:42\n"
- " b:42\n"
- " c:42];");
- verifyFormat("[[obj aaaaaa:42\n"
- " b:42]\n"
- " cc:42\n"
- " d:42];");
-
-
Style.ColumnLimit = 70;
verifyFormat(
"void f() {\n"
OpenPOWER on IntegriCloud