summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2015-05-06 13:13:03 +0000
committerDaniel Jasper <djasper@google.com>2015-05-06 13:13:03 +0000
commit2746a308c283a82e2d741b7ea9dde6e2d469ca3a (patch)
tree72fab8b28747a31228c709b60f9794afc08d58a0 /clang/unittests/Format/FormatTest.cpp
parenteb53668c3501150ad99bd35df604dff3b5c9e079 (diff)
downloadbcm5719-llvm-2746a308c283a82e2d741b7ea9dde6e2d469ca3a.tar.gz
bcm5719-llvm-2746a308c283a82e2d741b7ea9dde6e2d469ca3a.zip
clang-format: Fix bad wrapping of ObjC method exprs.
Before: [aaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaa: aaaaaaaa aaa:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa]; After: [aaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaa:aaaaaaaa aaa:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa]; Note that this might now violate the column limit and we probably need an alternative way of indenting these then. However, that is still strictly better than the messy formatting that clang-format did before. llvm-svn: 236598
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index c0441495b8b..7e75de4409a 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -7162,6 +7162,13 @@ TEST_F(FormatTest, FormatObjCMethodExpr) {
" aaaaaaaaaaaaaaa | aaaaaaaaaaaaaaa | aaaaaaaaaaaaaaa |\n"
" aaaaaaaaaaaaaaa | aaaaaaaaaaaaaaa];");
+ // FIXME: This violates the column limit.
+ verifyFormat(
+ "[aaaaaaaaaaaaaaaaaaaaaaaaa\n"
+ " aaaaaaaaaaaaaaaaa:aaaaaaaa\n"
+ " aaa:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa];",
+ getLLVMStyleWithColumns(60));
+
// Variadic parameters.
verifyFormat(
"NSArray *myStrings = [NSArray stringarray:@\"a\", @\"b\", nil];");
OpenPOWER on IntegriCloud