[clang] [clang-format] allow short function body on a single line (PR #151428)

via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 28 17:57:11 PDT 2025


================
@@ -14996,6 +14996,29 @@ TEST_F(FormatTest, SplitEmptyFunctionButNotRecord) {
                Style);
 }
 
+TEST_F(FormatTest, SplitShortFunction) {
+  FormatStyle Style = getLLVMStyleWithColumns(40);
----------------
brandb97 wrote:

In other tests, `FormatStyle Style = ...` is used, so for consistency I won’t replace `FormatStyle` with `auto`.

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


More information about the cfe-commits mailing list