summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2014-05-26 07:24:34 +0000
committerDaniel Jasper <djasper@google.com>2014-05-26 07:24:34 +0000
commitba1b6bb667df50c54d903b815e5ba26118231d27 (patch)
tree66b1bf28f1cca1482a65d7b7d0c0450249ae4aa3 /clang/lib
parent10743a9e6d585b0b08ca01b55d99e9c7513f769c (diff)
downloadbcm5719-llvm-ba1b6bb667df50c54d903b815e5ba26118231d27.tar.gz
bcm5719-llvm-ba1b6bb667df50c54d903b815e5ba26118231d27.zip
clang-format: Keep '{' of dict literals on the same line in Allman style
Before: void f() { [object someMethod:@ { @"a" : @"b" }]; } After: void f() { [object someMethod:@{ @"a" : @"b" }]; } This fixes llvm.org/PR19854. llvm-svn: 209615
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Format/TokenAnnotator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp
index f057ef7f3e7..3fea52b9f8a 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -1596,7 +1596,7 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine &Line,
!Style.ConstructorInitializerAllOnOneLineOrOnePerLine) {
return true;
} else if (Right.is(tok::l_brace) && Right.BlockKind == BK_Block &&
- Right.Type != TT_ObjCBlockLBrace) {
+ Right.Type != TT_ObjCBlockLBrace && Right.Type != TT_DictLiteral) {
return Style.BreakBeforeBraces == FormatStyle::BS_Allman ||
Style.BreakBeforeBraces == FormatStyle::BS_GNU;
} else if (Right.is(tok::string_literal) &&
OpenPOWER on IntegriCloud