aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Format/ConfigParseTest.cpp
diff options
context:
space:
mode:
authorJames Grant <42079499+jamesg-nz@users.noreply.github.com>2024-01-11 16:32:14 +1300
committerGitHub <noreply@github.com>2024-01-10 19:32:14 -0800
commitcc77e33271371e6ea29569ba06db9cfd1aac022a (patch)
tree24706dfca67291285937c6119ffe4dde715b25d5 /clang/unittests/Format/ConfigParseTest.cpp
parent1bc4cb51afb9abf6049ccfa44069cb1f0612e678 (diff)
downloadllvm-cc77e33271371e6ea29569ba06db9cfd1aac022a.zip
llvm-cc77e33271371e6ea29569ba06db9cfd1aac022a.tar.gz
llvm-cc77e33271371e6ea29569ba06db9cfd1aac022a.tar.bz2
[clang-format] Don't apply severe penalty if no possible column formats (#76675)
If there are possible column formats, but they weren't selected because they don't fit within remaining characters for the current path then applying severe penalty to induce column layout by selection of a different path seems fair. But if due to style configuration or what the input code is, there are no possible column formats, different paths aren't going to have column layouts. Seems wrong to apply the severe penalty to induce column layouts if there are none available. It just causes selection of sub-optimal paths, e.g. get bad formatting when brace initializers are used inside lambda bodies. Fixes #56350
Diffstat (limited to 'clang/unittests/Format/ConfigParseTest.cpp')
0 files changed, 0 insertions, 0 deletions