[PATCH] D93986: [clang-format] Add the possibility to align assignments spanning empty lines or comments

Björn Schäpers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 15 14:58:31 PST 2021


HazardyKnusperkeks added a comment.

In D93986#2495561 <https://reviews.llvm.org/D93986#2495561>, @MyDeveloperDay wrote:

> I think I would remove the code examples from the "AlignConsecutive style" to avoid confusion (that would be the first change)
>
> then perhaps regenerate and update the documentation so we can then see, its seems most have a "code block", can the specific examples not go into that area?
>
> And just have the enum explain its different configuration options?
>
>   /// \brief If ``true``, aligns consecutive C/C++ preprocessor macros.
>   ///
>   /// This will align C/C++ preprocessor macros of consecutive lines.
>   /// Will result in formattings like
>   /// \code
>   ///   #define SHORT_NAME       42
>   ///   #define LONGER_NAME      0x007f
>   ///   #define EVEN_LONGER_NAME (2)
>   ///   #define foo(x)           (x * x)
>   ///   #define bar(y, z)        (y + z)
>   /// \endcode
>   bool AlignConsecutiveMacros;

I think that's a good way to go.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93986



More information about the cfe-commits mailing list