bradh352 wrote:
> You can run `ninja clang-format-check-format` and/or `git clang-format HEAD~`
> before `git push`.
whoops, sorry about that
https://github.com/llvm/llvm-project/pull/108241
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
htt
@@ -302,47 +302,46 @@ TEST(ConfigParseTest, ParsesConfiguration) {
Style.FIELD.Enabled = true;
\
CHECK_PARSE(
\
#FIELD ": None", FIELD,
https://github.com/bradh352 updated
https://github.com/llvm/llvm-project/pull/108241
>From 00cbf31807ca8d8e1c0c86c6a691c47835522fe9 Mon Sep 17 00:00:00 2001
From: Brad House
Date: Wed, 11 Sep 2024 10:27:50 -0400
Subject: [PATCH 1/6] Add AlignFunctionDeclarations attribute to
AlignConsecutiveDe
https://github.com/bradh352 updated
https://github.com/llvm/llvm-project/pull/108241
>From 00cbf31807ca8d8e1c0c86c6a691c47835522fe9 Mon Sep 17 00:00:00 2001
From: Brad House
Date: Wed, 11 Sep 2024 10:27:50 -0400
Subject: [PATCH 1/5] Add AlignFunctionDeclarations attribute to
AlignConsecutiveDe
https://github.com/bradh352 updated
https://github.com/llvm/llvm-project/pull/108241
>From 00cbf31807ca8d8e1c0c86c6a691c47835522fe9 Mon Sep 17 00:00:00 2001
From: Brad House
Date: Wed, 11 Sep 2024 10:27:50 -0400
Subject: [PATCH 1/4] Add AlignFunctionDeclarations attribute to
AlignConsecutiveDe
bradh352 wrote:
> Please update `clang/docs/ReleaseNotes.rst`.
done
https://github.com/llvm/llvm-project/pull/108241
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bradh352 updated
https://github.com/llvm/llvm-project/pull/108241
>From 00cbf31807ca8d8e1c0c86c6a691c47835522fe9 Mon Sep 17 00:00:00 2001
From: Brad House
Date: Wed, 11 Sep 2024 10:27:50 -0400
Subject: [PATCH 1/4] Add AlignFunctionDeclarations attribute to
AlignConsecutiveDe
@@ -305,37 +305,43 @@ TEST(ConfigParseTest, ParsesConfiguration) {
FormatStyle::AlignConsecutiveStyle(
\
{/*Enabled=*/false, /*AcrossEmptyLines=*/false,
\
/*AcrossComments=*/false, /*AlignC
@@ -20010,6 +20010,17 @@ TEST_F(FormatTest, AlignConsecutiveDeclarations) {
" return 0;\n"
"}() };",
BracedAlign);
+
+ Alignment.AlignConsecutiveDeclarations.AlignFunctionDeclarations = false;
+ verifyFormat("unsigned int f1(void)
@@ -20010,6 +20010,17 @@ TEST_F(FormatTest, AlignConsecutiveDeclarations) {
" return 0;\n"
"}() };",
BracedAlign);
+
+ Alignment.AlignConsecutiveDeclarations.AlignFunctionDeclarations = false;
+ verifyFormat("unsigned int f1(void)
@@ -305,37 +305,43 @@ TEST(ConfigParseTest, ParsesConfiguration) {
FormatStyle::AlignConsecutiveStyle(
\
{/*Enabled=*/false, /*AcrossEmptyLines=*/false,
\
/*AcrossComments=*/false, /*AlignC
@@ -305,37 +305,43 @@ TEST(ConfigParseTest, ParsesConfiguration) {
FormatStyle::AlignConsecutiveStyle(
\
{/*Enabled=*/false, /*AcrossEmptyLines=*/false,
\
/*AcrossComments=*/false, /*AlignC
@@ -48,46 +48,62 @@ template <> struct
MappingTraits {
FormatStyle::AlignConsecutiveStyle(
{/*Enabled=*/false, /*AcrossEmptyLines=*/false,
/*AcrossComments=*/false, /*AlignCompound=*/false,
- /*AlignF
@@ -48,46 +48,62 @@ template <> struct
MappingTraits {
FormatStyle::AlignConsecutiveStyle(
{/*Enabled=*/false, /*AcrossEmptyLines=*/false,
/*AcrossComments=*/false, /*AlignCompound=*/false,
- /*AlignF
https://github.com/bradh352 updated
https://github.com/llvm/llvm-project/pull/108241
>From 00cbf31807ca8d8e1c0c86c6a691c47835522fe9 Mon Sep 17 00:00:00 2001
From: Brad House
Date: Wed, 11 Sep 2024 10:27:50 -0400
Subject: [PATCH 1/3] Add AlignFunctionDeclarations attribute to
AlignConsecutiveDe
bradh352 wrote:
ping
https://github.com/llvm/llvm-project/pull/108241
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -225,6 +225,21 @@ struct FormatStyle {
/// bbb = 2;
/// \endcode
bool AlignCompound;
+/// Only for ``AlignConsecutiveDeclarations``. Whether function
declarations
+/// are aligned.
+/// \code
+/// true:
+/// unsigned int f1(void);
+
https://github.com/bradh352 updated
https://github.com/llvm/llvm-project/pull/108241
>From 00cbf31807ca8d8e1c0c86c6a691c47835522fe9 Mon Sep 17 00:00:00 2001
From: Brad House
Date: Wed, 11 Sep 2024 10:27:50 -0400
Subject: [PATCH 1/2] Add AlignFunctionDeclarations attribute to
AlignConsecutiveDe
@@ -409,6 +409,21 @@ the configuration (without a prefix: ``Auto``).
int *p;
int (*f)();
+ * ``bool AlignFunctionDeclarations`` Only for
``AlignConsecutiveDeclarations``. Whether function declarations
bradh352 wrote:
ah, gotcha
https://gith
@@ -225,6 +225,21 @@ struct FormatStyle {
/// bbb = 2;
/// \endcode
bool AlignCompound;
+/// Only for ``AlignConsecutiveDeclarations``. Whether function
declarations
+/// are aligned.
+/// \code
+/// true:
+/// unsigned int f1(void);
+
@@ -225,6 +225,21 @@ struct FormatStyle {
/// bbb = 2;
/// \endcode
bool AlignCompound;
+/// Only for ``AlignConsecutiveDeclarations``. Whether function
declarations
+/// are aligned.
+/// \code
+/// true:
+/// unsigned int f1(void);
+
bradh352 wrote:
I'm honestly not sure how to fix the formatting in this. I'm not seeing
anything wrong with my addition in Format.h, but maybe there's something I'm
missing. I never touch ClangFormatStyleOptions.rst directly.
https://github.com/llvm/llvm-project/pull/108241
_
https://github.com/bradh352 updated
https://github.com/llvm/llvm-project/pull/108241
>From 00cbf31807ca8d8e1c0c86c6a691c47835522fe9 Mon Sep 17 00:00:00 2001
From: Brad House
Date: Wed, 11 Sep 2024 10:27:50 -0400
Subject: [PATCH] Add AlignFunctionDeclarations attribute to
AlignConsecutiveDeclar
https://github.com/bradh352 updated
https://github.com/llvm/llvm-project/pull/108241
>From 6ec2e5423026599fd2d90356e71b08d787c1989c Mon Sep 17 00:00:00 2001
From: Brad House
Date: Wed, 11 Sep 2024 10:27:50 -0400
Subject: [PATCH 1/2] Add AlignFunctionDeclarations attribute to
AlignConsecutiveDe
https://github.com/bradh352 updated
https://github.com/llvm/llvm-project/pull/108241
>From 6ec2e5423026599fd2d90356e71b08d787c1989c Mon Sep 17 00:00:00 2001
From: Brad House
Date: Wed, 11 Sep 2024 10:27:50 -0400
Subject: [PATCH] Add AlignFunctionDeclarations attribute to
AlignConsecutiveDeclar
@@ -265,6 +279,7 @@ struct FormatStyle {
AcrossComments == R.AcrossComments &&
AlignCompound == R.AlignCompound &&
AlignFunctionPointers == R.AlignFunctionPointers &&
+ AlignFunctionDeclarations == R.AlignFunctionDeclarations &
@@ -409,6 +409,21 @@ the configuration (without a prefix: ``Auto``).
int *p;
int (*f)();
+ * ``bool AlignFunctionDeclarations`` Only for
``AlignConsecutiveDeclarations``. Whether function declarations
bradh352 wrote:
I added version 20, let
https://github.com/bradh352 updated
https://github.com/llvm/llvm-project/pull/108241
>From 89d238800f0287f29f95165e05530d3f5e397245 Mon Sep 17 00:00:00 2001
From: Brad House
Date: Wed, 11 Sep 2024 10:27:50 -0400
Subject: [PATCH 1/2] Add AlignFunctionDeclarations attribute to
AlignConsecutiveDe
bradh352 wrote:
> By and large this looks ok, (as long as your rst change was generated using
> the docs/tools/dump_format_style.py)
Yes, it was generated via the script.
https://github.com/llvm/llvm-project/pull/108241
___
cfe-commits mailing list
@@ -1448,6 +1464,7 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind
Language) {
LLVMStyle.AlignConsecutiveAssignments.PadOperators = true;
LLVMStyle.AlignConsecutiveBitFields = {};
LLVMStyle.AlignConsecutiveDeclarations = {};
+ LLVMStyle.AlignConsecutiveDeclaration
bradh352 wrote:
I just corrected the formatting...
https://github.com/llvm/llvm-project/pull/108241
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bradh352 updated
https://github.com/llvm/llvm-project/pull/108241
>From 89d238800f0287f29f95165e05530d3f5e397245 Mon Sep 17 00:00:00 2001
From: Brad House
Date: Wed, 11 Sep 2024 10:27:50 -0400
Subject: [PATCH] Add AlignFunctionDeclarations attribute to
AlignConsecutiveDeclar
https://github.com/bradh352 edited
https://github.com/llvm/llvm-project/pull/108241
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bradh352 created
https://github.com/llvm/llvm-project/pull/108241
Enabling AlignConsecutiveDeclarations also aligns function prototypes
or declarations. This is often unexpected as typically function
prototypes, especially in public headers, don't use any padding.
Setting Al
34 matches
Mail list logo