[clang] [clang-format] Add ApplyAlwaysOnePerLineToTemplateArguments option (PR #137544)

2025-04-27 Thread Lorenzo Mauro via cfe-commits
LorenzoMauro wrote: Thanks for taking a look! Happy to adjust anything if needed. https://github.com/llvm/llvm-project/pull/137544 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add ApplyAlwaysOnePerLineToTemplateArguments option (PR #137544)

2025-04-27 Thread Lorenzo Mauro via cfe-commits
https://github.com/LorenzoMauro created https://github.com/llvm/llvm-project/pull/137544 Introduce a new FormatStyle option, `ApplyAlwaysOnePerLineToTemplateArguments`, which controls whether `BinPackParameters=AlwaysOnePerLine` also applies to template argument lists. This allows users to

[clang] [clang-format] Add ApplyAlwaysOnePerLineToTemplateArguments option (PR #137544)

2025-04-27 Thread Lorenzo Mauro via cfe-commits
https://github.com/LorenzoMauro updated https://github.com/llvm/llvm-project/pull/137544 >From b4ea6eebd552436b91bb077c138bf788133f31c3 Mon Sep 17 00:00:00 2001 From: Lorenzo Date: Sun, 27 Apr 2025 20:24:58 +0200 Subject: [PATCH] [clang-format] Add ApplyAlwaysOnePerLineToTemplateArguments opti

[clang] [clang-format] Add ApplyAlwaysOnePerLineToTemplateArguments option (PR #137544)

2025-04-29 Thread Lorenzo Mauro via cfe-commits
LorenzoMauro wrote: Thank you @HazardyKnusperkeks for the review. @owenca I agree — I also don't see why anyone would want the current behavior, so it definitely seems like a bug to me as well. It's absolutely possible to fix this without introducing a new option: the check I wrote could simpl

[clang] [clang-format] Add ApplyAlwaysOnePerLineToTemplateArguments option (PR #137544)

2025-05-24 Thread Lorenzo Mauro via cfe-commits
@@ -1521,6 +1523,7 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind Language) { LLVMStyle.BinPackArguments = true; LLVMStyle.BinPackLongBracedList = true; LLVMStyle.BinPackParameters = FormatStyle::BPPS_BinPack; + LLVMStyle.ApplyAlwaysOnePerLineToTemplateArguments

[clang] [clang-format] Add ApplyAlwaysOnePerLineToTemplateArguments option (PR #137544)

2025-05-24 Thread Lorenzo Mauro via cfe-commits
LorenzoMauro wrote: @rmarker as of now the option```ApplyAlwaysOnePerLineToTemplateArguments``` makes any changes in the formatting only when ```BinPackParameters: AlwaysOnePerLine``` and it makes it behave as if ```BinPackParameters``` was set to ```OnePerLine``` for templates, so it puts eac