[clang] [clang-format] Support fine-grained alignment of variable declarations (PR #160270)
Gedare Bloom via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 1 09:46:29 PDT 2025
================
@@ -256,6 +270,20 @@ struct FormatStyle {
/// int (*f)();
/// \endcode
bool AlignFunctionPointers;
+ /// Only for ``AlignConsecutiveDeclarations``. Whether class/struct member
+ /// variable declarations are aligned.
+ /// \code
+ /// true:
+ /// unsigned int member1;
+ /// float member2;
+ /// size_t member3;
+ ///
+ /// false:
+ /// unsigned int member1;
+ /// float member2;
+ /// size_t member3;
+ /// \endcode
+ bool AlignMemberVariableDeclarations;
----------------
gedare wrote:
And similarly `AlignMemberVariables`.
https://github.com/llvm/llvm-project/pull/160270
More information about the cfe-commits
mailing list