summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff options
context:
space:
mode:
authorFrancois Ferrand <thetypz@gmail.com>2017-06-19 14:41:21 +0000
committerFrancois Ferrand <thetypz@gmail.com>2017-06-19 14:41:21 +0000
commit5f07f443be954e2d4feed14eb6ea573f0d4e5d01 (patch)
tree93d93888a7dd2a77f699a1d5ef6ca5995c272c14 /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parent4f1e047a6d2a2abec905a6885c5146966c448cb1 (diff)
downloadbcm5719-llvm-5f07f443be954e2d4feed14eb6ea573f0d4e5d01.tar.gz
bcm5719-llvm-5f07f443be954e2d4feed14eb6ea573f0d4e5d01.zip
clang-format: Fix C99 designated initializers corner cases
Summary: This fixes the missing space before the designated initializer when `Cpp11BracedListStyle=false` : const struct A a = { .a = 1, .b = 2 }; ^ Also, wrapping between opening brace and designated array initializers used to have an excessive penalty (like breaking between an expression and the subscript operator), leading to unexpected wrapping: const struct Aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaa = {[1] = aaaaaaaaaaaaaaaaaaaaaaaaaaa, [2] = bbbbbbbbbbbbbbbbbbbbbbbbbbb}; instead of: const struct Aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaa = { [1] = aaaaaaaaaaaaaaaaaaaaaaaaaaa, [2] = bbbbbbbbbbbbbbbbbbbbbbbbbbb}; Finally, designated array initializers are not binpacked, just like designated member initializers. Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits, krasimir, klimek Differential Revision: https://reviews.llvm.org/D33491 llvm-svn: 305696
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud