[clang] [clang-format] Add SpacesInParensOption for filtering repeated parens (PR #77522)

Owen Pan via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 3 23:26:36 PDT 2024


================
@@ -4681,23 +4695,30 @@ struct FormatStyle {
     bool InEmptyParentheses;
     /// Put a space in parentheses not covered by preceding options.
     /// \code
-    ///    true:                                  false:
-    ///    t f( Deleted & ) & = delete;   vs.     t f(Deleted &) & = delete;
+    ///   true:                                 false:
+    ///   t f( Deleted & ) & = delete;    vs.   t f(Deleted &) & = delete;
+    ///   decltype( ( x ) )                     decltype((x))
+    ///   x = ( (int32)y )                      x = ((int32))y
+    ///   y = ( (int ( * )( int ))foo )( x );   y = ((int (*)(int))foo)(x);
+    ///    __attribute__( ( noreturn ) )        __attribute__((noreturn))
----------------
owenca wrote:

These new examples are a little confusing IMO. I would just delete them.

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


More information about the cfe-commits mailing list