diff options
author | Francois Ferrand <thetypz@gmail.com> | 2018-05-16 08:03:52 +0000 |
---|---|---|
committer | Francois Ferrand <thetypz@gmail.com> | 2018-05-16 08:03:52 +0000 |
commit | f92f806aa45165578d4e08349ad4b3669ec71979 (patch) | |
tree | 42d790e021b3d60b669b09a3eb86432b50e38850 /llvm/utils/lit/tests/xunit-output.py | |
parent | 67f9154964456ce523d8bdac892e8cf2428c3f3d (diff) | |
download | llvm-f92f806aa45165578d4e08349ad4b3669ec71979.zip llvm-f92f806aa45165578d4e08349ad4b3669ec71979.tar.gz llvm-f92f806aa45165578d4e08349ad4b3669ec71979.tar.bz2 |
clang-format: tweak formatting of variable initialization blocks
Summary:
This patch changes the behavior of PenaltyBreakBeforeFirstCallParameter
so that is does not apply after a brace, when Cpp11BracedListStyle is
false.
This way, variable initialization is wrapped more like an initializer
than like a function call, which is more consistent with user
expectations for this braced list style.
With PenaltyBreakBeforeFirstCallParameter=200, this gives the following
code: (with Cpp11BracedListStyle=false)
Before :
const std::unordered_map<std::string, int> Something::MyHashTable =
{ { "aaaaaaaaaaaaaaaaaaaaa", 0 },
{ "bbbbbbbbbbbbbbbbbbbbb", 1 },
{ "ccccccccccccccccccccc", 2 } };
After :
const std::unordered_set<std::string> Something::MyUnorderedSet = {
{ "aaaaaaaaaaaaaaaaaaaaa", 0 },
{ "bbbbbbbbbbbbbbbbbbbbb", 1 },
{ "ccccccccccccccccccccc", 2 }
};
Reviewers: krasimir, djasper, klimek
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D43290
llvm-svn: 332434
Diffstat (limited to 'llvm/utils/lit/tests/xunit-output.py')
0 files changed, 0 insertions, 0 deletions