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

2024-01-10 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/76675 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-01-09 Thread Owen Pan via cfe-commits
https://github.com/owenca approved this pull request. https://github.com/llvm/llvm-project/pull/76675 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-01-02 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. As far as I'm concerned it looks good. But I need a second opinion. @mydeveloperday @owenca @rymiel https://github.com/llvm/llvm-project/pull/76675 ___ cfe-commits mailing list cfe-com

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

2024-01-02 Thread Björn Schäpers via cfe-commits
HazardyKnusperkeks wrote: > > I think that's not the right way to fix the issue. > > Why are the 2 lines formatted differently? It seems to me that this fixes > > the symptom, not the cause. > > Because for the line where brackets are used it meets the condition in the > next `if` statement do

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

2024-01-01 Thread James Grant via cfe-commits
jamesg-nz wrote: > I think that's not the right way to fix the issue. > > Why are the 2 lines formatted differently? It seems to me that this fixes the > symptom, not the cause. Because for the line where brackets are used it meets the condition in the next `if` statement down: https://githu

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

2024-01-01 Thread Björn Schäpers via cfe-commits
HazardyKnusperkeks wrote: I think that's not the right way to fix the issue. Why are the 2 lines formatted differently? It seems to me that this fixes the symptom, not the cause. https://github.com/llvm/llvm-project/pull/76675 ___ cfe-commits mailing

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

2024-01-01 Thread James Grant via cfe-commits
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: 1`. So pretty obvious the [severe penalty](https://github.com/llvm/llvm-project/blob/703e83611cd8bb7174ae76ba2e301f5a5e88b905/clan

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

2024-01-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: James Grant (jamesg-nz) Changes 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 selecti

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

2024-01-01 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it i

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

2024-01-01 Thread James Grant via cfe-commits
https://github.com/jamesg-nz created https://github.com/llvm/llvm-project/pull/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 di