[clang] [clang-format] allow short function body on a single line (PR #151428)
Lidong Yan via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 11 07:28:45 PDT 2025
================
@@ -3829,6 +3829,23 @@ struct FormatStyle {
/// \version 13
int PPIndentWidth;
+ /// Dependent on the value, function body can be put on a single line.
+ /// Automatically enabled when
+ /// `AllowShortFunctionsOnASingleLine` is set to `None` and
+ /// `AllowShortBlocksOnASingleLine` is set to `Always`.
----------------
brandb97 wrote:
Then I will remove this feature, user will use `PutShortFunctionBodiesOnASingleLine` to control function body format rather than use two options which is more complex.
https://github.com/llvm/llvm-project/pull/151428
More information about the cfe-commits
mailing list