summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2015-05-28 07:21:50 +0000
committerDaniel Jasper <djasper@google.com>2015-05-28 07:21:50 +0000
commitf841d3a6c1ab928bc8aeb7c7ed1526bd81a60edb (patch)
tree0767b0c7acbf97da0be1683d5f7ef189ad585615 /clang/unittests/Format/FormatTest.cpp
parent85693aeb436f6b9b43b4913bbfe557c74a494f9d (diff)
downloadbcm5719-llvm-f841d3a6c1ab928bc8aeb7c7ed1526bd81a60edb.tar.gz
bcm5719-llvm-f841d3a6c1ab928bc8aeb7c7ed1526bd81a60edb.zip
clang-format: Lower binding strengths created by the [] created by ObjC
method expressions and array literals. They should not bind stronger than regular parentheses or the braces of braced lists. Specific test case in JavaScript: Before: var aaaaa: List< SomeThing> = [new SomeThingAAAAAAAAAAAA(), new SomeThingBBBBBBBBB()]; After: var aaaaa: List<SomeThing> = [ new SomeThingAAAAAAAAAAAA(), new SomeThingBBBBBBBBB() ]; llvm-svn: 238400
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 1c100c3b9b0..09e514e7cdb 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -7585,9 +7585,9 @@ TEST_F(FormatTest, ObjCArrayLiterals) {
" index:(NSUInteger)index\n"
" nonDigitAttributes:\n"
" (NSDictionary *)noDigitAttributes;");
- verifyFormat(
- "[someFunction someLooooooooooooongParameter:\n"
- " @[ NSBundle.mainBundle.infoDictionary[@\"a\"] ]];");
+ verifyFormat("[someFunction someLooooooooooooongParameter:@[\n"
+ " NSBundle.mainBundle.infoDictionary[@\"a\"]\n"
+ "]];");
}
TEST_F(FormatTest, ReformatRegionAdjustsIndent) {
OpenPOWER on IntegriCloud