From: Karthik Nayak Date: Mon, 08 Jul 2024 09:23:13 GMT Subject: [PATCH 5/8] clang-format: avoid braces on simple single-statement bodies Message-ID: <20240708092317.267915-6-karthik.188@gmail.com> In-Reply-To: <20240708092317.267915-1-karthik.188@gmail.com> Set the 'RemoveBracesLLVM' to 'true' which ensures that we avoid curly braces for single-statement bodies in conditional blocks. Signed-off-by: Karthik Nayak --- .clang-format | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.clang-format b/.clang-format index 914254a29b..1a5f0c9046 100644 --- a/.clang-format +++ b/.clang-format @@ -117,6 +117,11 @@ IndentWrappedFunctionNames: false # int *a; PointerAlignment: Right +# Remove optional braces of control statements (if, else, for, and while) +# according to the LLVM coding style +# This avoids braces on simple single-statement bodies of statements. +RemoveBracesLLVM: true + # Don't insert a space after a cast # x = (int32)y; not x = (int32) y; SpaceAfterCStyleCast: false -- 2.45.1