summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/FormatToken.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-10-24 10:31:50 +0000
committerDaniel Jasper <djasper@google.com>2013-10-24 10:31:50 +0000
commitb596fb2be2e436ac24162c284fdbe3fe6f69be3d (patch)
tree5ba1c922ccdc2393e914a0b21cefcba3b2c93552 /clang/lib/Format/FormatToken.cpp
parent1ec9df3322d05a5be1144acd4d013865f9eb353f (diff)
downloadbcm5719-llvm-b596fb2be2e436ac24162c284fdbe3fe6f69be3d.tar.gz
bcm5719-llvm-b596fb2be2e436ac24162c284fdbe3fe6f69be3d.zip
clang-format: Cleanup array initializer and dict initializer formatting.
Significant changes: - Also recognize these literals with missing "@" for robustness. - Reorganize tests. llvm-svn: 193325
Diffstat (limited to 'clang/lib/Format/FormatToken.cpp')
-rw-r--r--clang/lib/Format/FormatToken.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Format/FormatToken.cpp b/clang/lib/Format/FormatToken.cpp
index 35764ce8823..4ca4edbe158 100644
--- a/clang/lib/Format/FormatToken.cpp
+++ b/clang/lib/Format/FormatToken.cpp
@@ -37,6 +37,7 @@ unsigned CommaSeparatedList::format(LineState &State,
const FormatToken *LBrace = State.NextToken->Previous->Previous;
if (LBrace->isNot(tok::l_brace) ||
LBrace->BlockKind == BK_Block ||
+ LBrace->Type == TT_DictLiteral ||
LBrace->Next->Type == TT_DesignatedInitializerPeriod)
return 0;
OpenPOWER on IntegriCloud