diff options
author | Daniel Jasper <djasper@google.com> | 2013-10-24 10:31:50 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-10-24 10:31:50 +0000 |
commit | 3c6aea7ac63265c769b5fe09e213ab1c4cee111e (patch) | |
tree | f8a608f7b9d254327113af6875675c0d74913e9b /lib/Format/FormatToken.cpp | |
parent | 7edf9a4e4c5a36b2e43949f454b2e6c4aa2efd1c (diff) |
clang-format: Cleanup array initializer and dict initializer formatting.
Significant changes:
- Also recognize these literals with missing "@" for robustness.
- Reorganize tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193325 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/FormatToken.cpp')
-rw-r--r-- | lib/Format/FormatToken.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Format/FormatToken.cpp b/lib/Format/FormatToken.cpp index 35764ce882..4ca4edbe15 100644 --- a/lib/Format/FormatToken.cpp +++ b/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; |