[clang] [clang-format] Don't apply severe penalty if no possible column formats (PR #76675)

James Grant via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 1 04:48:10 PST 2024


jamesg-nz wrote:

Running debug build clang-format with `-debug` parameter against code provided in #56350 (and its duplicate #58469) you see `Penalty for line: 10000`. So pretty obvious the [severe penalty](https://github.com/llvm/llvm-project/blob/703e83611cd8bb7174ae76ba2e301f5a5e88b905/clang/lib/Format/FormatToken.cpp#L140) is responsible. 

Thoughts on this change? Is the removal of the severe penalty being applied too broadly? ... or is it correct/OK?

https://github.com/llvm/llvm-project/pull/76675


More information about the cfe-commits mailing list