summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
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
commita1ea4cbb8005980efae36ed5402af4f00aecace7 (patch)
tree96dde5c27e8d9169ed05037d2f60bc16ded26f89 /clang/unittests/Format/FormatTest.cpp
parenta933f94c92862db06ec6c564683012180b20762c (diff)
downloadbcm5719-llvm-a1ea4cbb8005980efae36ed5402af4f00aecace7.tar.gz
bcm5719-llvm-a1ea4cbb8005980efae36ed5402af4f00aecace7.zip
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. llvm-svn: 193475
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index ac95f27b2f6..cbac133c4d9 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/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) {
OpenPOWER on IntegriCloud