Skip to content
Unverified Commit cc77e332 authored by James Grant's avatar James Grant Committed by GitHub
Browse files

[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
parent 1bc4cb51
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment