[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
Mon Apr 14 22:03:59 PDT 2025


================
@@ -293,15 +293,14 @@ class LineJoiner {
 
     auto ShouldMergeShortFunctions = [this, &I, &NextLine, PreviousLine,
                                       TheLine]() {
-      if (Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_All)
+      if (Style.AllowShortFunctionsOnASingleLine.Other)
----------------
owenca wrote:

Isn't `SFS_All` equivalent to `Empty && Inline && Other`?

https://github.com/llvm/llvm-project/pull/134337


More information about the cfe-commits mailing list