================ @@ -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`. + /// \code + /// true: + /// int f() + /// { return 0; } + /// + /// false: + /// int f() { + /// return 0; + /// } + /// \endcode + /// \version 20 + bool PutShortFunctionBodiesOnASingleLine; ---------------- HazardyKnusperkeks wrote:
In a first round you can just add `Always` and `Never` and leave `Leave` for later. https://github.com/llvm/llvm-project/pull/151428 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits