[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
Loading
Please sign in to comment