]> granicus.if.org Git - clang/commit
Fix detection/formatting of braced lists in ternary expressions.
authorDaniel Jasper <djasper@google.com>
Fri, 31 May 2013 10:09:55 +0000 (10:09 +0000)
committerDaniel Jasper <djasper@google.com>
Fri, 31 May 2013 10:09:55 +0000 (10:09 +0000)
commiteb48366d41a6dcca236f1e28aea61efd569a3374
treec0ceac42041ed0531f850f802e85048510e14fb9
parent042ca3de1e8d723cb73ee4d9984509e4489a6bb7
Fix detection/formatting of braced lists in ternary expressions.

Before:
foo = aaaaaaaaaaa ? vector<int> {
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, aaaaa
}
: vector<int>{ bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb, bbbbb };

After:
foo = aaaaaaaaaaa ? vector<int>{ aaaaaaaaaaaaaaaaaaaaaaaaaaa,
                                 aaaaaaaaaaaaaaaaaaaa, aaaaa }
                  : vector<int>{ bbbbbbbbbbbbbbbbbbbbbbbbbbb,
                                 bbbbbbbbbbbbbbbbbbbb, bbbbb };

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182992 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Format/UnwrappedLineParser.cpp
unittests/Format/FormatTest.cpp