[clang] [clang-format] Disable short blocks if brace is on the new line (PR #196021)

Björn Schäpers via cfe-commits cfe-commits at lists.llvm.org
Thu May 7 12:47:25 PDT 2026


================
@@ -1607,21 +1607,15 @@ TEST_F(FormatTest, FormatShortBracedStatements) {
   AllowSimpleBracedStatements.AllowShortIfStatementsOnASingleLine =
       FormatStyle::SIS_Never;
   verifyFormat("if (true) {}", AllowSimpleBracedStatements);
-  verifyFormat("if (true) {\n"
-               "  f();\n"
-               "}",
-               AllowSimpleBracedStatements);
+  verifyFormat("if (true) { f(); }", AllowSimpleBracedStatements);
----------------
HazardyKnusperkeks wrote:

It says `Never` but this is on a single line. This has to be fixed before I can take another look.

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


More information about the cfe-commits mailing list