aboutsummaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-10-26 17:00:22 +0000
committerDaniel Jasper <djasper@google.com>2013-10-26 17:00:22 +0000
commit8f54d881723ca7058807eee871913c812618bfda (patch)
tree7f25c9dc25a12be26b0b96fff802f8b81b417625 /unittests
parent2f0ca41d213deb3637502fc9182e99035e7d1fc4 (diff)
downloadclang-8f54d881723ca7058807eee871913c812618bfda.tar.gz
clang-format: Fix ObjC method exprs with variadic parameters.
Before: _versionLabel.text = [ NSString stringWithFormat:NSLocalizedString(@"version: %@", @"Label"), [NSBundle mainBundle].infoDictionary[@"CFBundleShortVersionString"] ]; After: _versionLabel.text = [NSString stringWithFormat:NSLocalizedString(@"version: %@", @"Label"), [NSBundle mainBundle].infoDictionary[@"CFBundleShortVersionString"]]; This fixed llvm.org/PR17695. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193475 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/Format/FormatTest.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index ac95f27b2f..cbac133c4d 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -5304,6 +5304,10 @@ TEST_F(FormatTest, FormatObjCMethodExpr) {
" aaaaaaaaaa:bbbbbbbbbbbbbbbbb\n"
" aaaaa:bbbbbbbbbbb + bbbbbbbbbbbb\n"
" aaaa:bbb];");
+
+ // Variadic parameters.
+ verifyFormat(
+ "NSArray *myStrings = [NSArray stringarray:@\"a\", @\"b\", nil];");
}
TEST_F(FormatTest, ObjCAt) {