[clang] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)
Owen Pan via cfe-commits
cfe-commits at lists.llvm.org
Sat Apr 5 12:00:15 PDT 2025
================
@@ -1501,6 +1536,8 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind Language) {
LLVMStyle.AllowShortCompoundRequirementOnASingleLine = true;
LLVMStyle.AllowShortEnumsOnASingleLine = true;
LLVMStyle.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_All;
+ LLVMStyle.AllowShortFunctionsOnASingleLineOptions = {};
----------------
owenca wrote:
```suggestion
LLVMStyle.AllowShortFunctionsOnASingleLineOptions.Empty = true;
LLVMStyle.AllowShortFunctionsOnASingleLineOptions.Inline = true;
```
`SFS_All` requires setting everything.
https://github.com/llvm/llvm-project/pull/134337
More information about the cfe-commits
mailing list