[clang] [clang-format] add an option to insert a space only for non-code block empty braces, not for empty parentheses (PR #93634)

via cfe-commits cfe-commits at lists.llvm.org
Wed May 29 01:12:04 PDT 2024


================
@@ -6237,18 +6237,30 @@ the configuration (without a prefix: ``Auto``).
        true:                                  false:
        x = ( int32 )y                 vs.     x = (int32)y
 
-  * ``bool InEmptyParentheses`` Put a space in parentheses only if the parentheses are empty i.e. '()'
+  * ``bool InEmptyParentheses`` Put a space in parentheses and braces only if they are empty i.e. '()' or '{}'
----------------
mydeveloperday wrote:

it feels to me like InEmptyParentheses should be parenthese only but InEmptyBraces should inherit by default from InEmptyParentheses  if its not defined in the config?

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


More information about the cfe-commits mailing list