[clang] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 9 06:42:50 PDT 2025


================
@@ -1959,6 +1964,52 @@ the configuration (without a prefix: ``Auto``).
       };
       void f() { bar(); }
 
+  Also can be specified as a nested configuration flag:
+
+  .. code-block:: c++
+
+    # Example of usage:
+    AllowShortFunctionsOnASingleLine: InlineOnly
+
+    # or more granular control:
+    AllowShortFunctionsOnASingleLine:
+      Empty: false
+      Inline: true
+      All: false
----------------
sstwcw wrote:

All should probably be other.

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


More information about the cfe-commits mailing list