aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-02-03 18:07:15 +0000
committerDaniel Jasper <djasper@google.com>2013-02-03 18:07:15 +0000
commit6bd0232b4f58e7ad40f687b09b0eb897bcc3fd1e (patch)
tree63e1c15f006dc4a58aa2d2ba66af8bb3f4a5c8e4 /lib
parent4c494f4af76017e2bb389a3a96cbcdbb8973cf97 (diff)
Fix bug in formatting of nested initializers.
We can now format: SomeArrayOfSomeType a = { { { 1, 2, 3 } }, { { 1, 2, 3 } }, { { 111111111111111111111111111111, 222222222222222222222222222222, 333333333333333333333333333333 } }, { { 1, 2, 3 } }, { { 1, 2, 3 } } }; Before, we did strange things there. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174291 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Format/Format.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp
index d638221de6..6cfa0d8823 100644
--- a/lib/Format/Format.cpp
+++ b/lib/Format/Format.cpp
@@ -528,7 +528,6 @@ private:
if (Current.is(tok::question))
State.Stack.back().QuestionColumn = State.Column;
if (Current.is(tok::l_brace) && Current.MatchingParen != NULL &&
- Current.Children[0].isNot(tok::l_brace) &&
!Current.MatchingParen->MustBreakBefore) {
AnnotatedToken *End = Current.MatchingParen;
while (!End->Children.empty() && !End->Children[0].CanBreakBefore) {