[clang] [clang-format] Add ApplyAlwaysOnePerLineToTemplateArguments option (PR #137544)
Lorenzo Mauro via cfe-commits
cfe-commits at lists.llvm.org
Sat May 24 08:51:13 PDT 2025
================
@@ -1521,6 +1523,7 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind Language) {
LLVMStyle.BinPackArguments = true;
LLVMStyle.BinPackLongBracedList = true;
LLVMStyle.BinPackParameters = FormatStyle::BPPS_BinPack;
+ LLVMStyle.ApplyAlwaysOnePerLineToTemplateArguments = true;
----------------
LorenzoMauro wrote:
yes, ```ApplyAlwaysOnePerLineToTemplateArguments=true``` leaves the behaviour as currently is which means that when ```BinPackParameters=AlwaysOnePerLine```
we get something like:
```cpp
void foo(
int a,
int b);
template<
typename A,
typename B>
struct bar{};
```
https://github.com/llvm/llvm-project/pull/137544
More information about the cfe-commits
mailing list