HazardyKnusperkeks added inline comments.

================
Comment at: clang/include/clang/Format/Format.h:4208-4213
+    /// Put a space in parentheses inside attribute specifier lists.
+    /// \code
+    ///    true:                                  false:
+    ///    __attribute__(( noreturn ))    vs.     __attribute__((noreturn))
+    /// \endcode
+    bool InAttributeSpecifierLists;
----------------
gedare wrote:
> owenpan wrote:
> > This should be covered by `SpacesInParetheses`, so we really should not 
> > have a special option for `__attribute__`.
> Currently, the behavior of `SpacesInParentheses` does this:
> ```
> __attribute__( ( noreturn ) )
> ```
> In order to prevent this from happening, it is necessary to add an option to 
> disable it somehow, because I don't see that this kind of spacing should ever 
> be used by anyone, but probably someone does it, and it should be maintained 
> for backward compatibility anyway.
> Currently, the behavior of `SpacesInParentheses` does this:
> ```
> __attribute__( ( noreturn ) )
> ```
> In order to prevent this from happening, it is necessary to add an option to 
> disable it somehow, because I don't see that this kind of spacing should ever 
> be used by anyone, but probably someone does it, and it should be maintained 
> for backward compatibility anyway.

And what does clang-format do before your `SpacesInParentheses`? You should 
expand the tests to cover the attributes (if they aren't in there already).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155529/new/

https://reviews.llvm.org/D155529

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to