[clang] [clang-format] allow short function body on a single line (PR #151428)
Lidong Yan via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 19 04:34:03 PDT 2025
brandb97 wrote:
@owenca I actually think adding a new option would be better. The reason is that when users want to specify putting function bodies on a single line, without a new option, they would have to set
AllowShortFunctionsOnASingleLine: Never
AllowShortBlocksOnASingleLine: Always
But such a setting would also cause shorter if and while blocks to be placed on a single line, which users might not want. With a new option, this problem wouldn’t occur.
https://github.com/llvm/llvm-project/pull/151428
More information about the cfe-commits
mailing list