diff options
author | Daniel Jasper <djasper@google.com> | 2015-05-06 13:13:03 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2015-05-06 13:13:03 +0000 |
commit | 2746a308c283a82e2d741b7ea9dde6e2d469ca3a (patch) | |
tree | 72fab8b28747a31228c709b60f9794afc08d58a0 /clang/unittests/Format/FormatTest.cpp | |
parent | eb53668c3501150ad99bd35df604dff3b5c9e079 (diff) | |
download | bcm5719-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.cpp | 7 |
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];"); |