Set the 'RemoveBracesLLVM' to 'true' which ensures that we avoid curly braces for single-statement bodies in conditional blocks. Signed-off-by: Karthik Nayak <karthik.188@xxxxxxxxx> --- .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