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
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
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
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
@@ -1521,6 +1523,7 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind
Language) {
LLVMStyle.BinPackArguments = true;
LLVMStyle.BinPackLongBracedList = true;
LLVMStyle.BinPackParameters = FormatStyle::BPPS_BinPack;
+ LLVMStyle.ApplyAlwaysOnePerLineToTemplateArguments
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