[clang] clang-format: Add AlignFunctionDeclarations attribute to AlignConsecutiveDeclarations (PR #108241)

2024-10-06 Thread Brad House via cfe-commits
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

[clang] clang-format: Add AlignFunctionDeclarations attribute to AlignConsecutiveDeclarations (PR #108241)

2024-10-06 Thread Brad House via cfe-commits
@@ -302,47 +302,46 @@ TEST(ConfigParseTest, ParsesConfiguration) { Style.FIELD.Enabled = true; \ CHECK_PARSE( \ #FIELD ": None", FIELD,

[clang] clang-format: Add AlignFunctionDeclarations attribute to AlignConsecutiveDeclarations (PR #108241)

2024-10-06 Thread Brad House via 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/6] Add AlignFunctionDeclarations attribute to AlignConsecutiveDe

[clang] clang-format: Add AlignFunctionDeclarations attribute to AlignConsecutiveDeclarations (PR #108241)

2024-10-06 Thread Brad House via 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/5] Add AlignFunctionDeclarations attribute to AlignConsecutiveDe

[clang] clang-format: Add AlignFunctionDeclarations attribute to AlignConsecutiveDeclarations (PR #108241)

2024-10-06 Thread Brad House via 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

[clang] clang-format: Add AlignFunctionDeclarations attribute to AlignConsecutiveDeclarations (PR #108241)

2024-10-06 Thread Brad House via cfe-commits
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

[clang] clang-format: Add AlignFunctionDeclarations attribute to AlignConsecutiveDeclarations (PR #108241)

2024-10-06 Thread Brad House via 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

[clang] clang-format: Add AlignFunctionDeclarations attribute to AlignConsecutiveDeclarations (PR #108241)

2024-10-06 Thread Brad House via cfe-commits
@@ -305,37 +305,43 @@ TEST(ConfigParseTest, ParsesConfiguration) { FormatStyle::AlignConsecutiveStyle( \ {/*Enabled=*/false, /*AcrossEmptyLines=*/false, \ /*AcrossComments=*/false, /*AlignC

[clang] clang-format: Add AlignFunctionDeclarations attribute to AlignConsecutiveDeclarations (PR #108241)

2024-10-06 Thread Brad House via cfe-commits
@@ -20010,6 +20010,17 @@ TEST_F(FormatTest, AlignConsecutiveDeclarations) { " return 0;\n" "}() };", BracedAlign); + + Alignment.AlignConsecutiveDeclarations.AlignFunctionDeclarations = false; + verifyFormat("unsigned int f1(void)

[clang] clang-format: Add AlignFunctionDeclarations attribute to AlignConsecutiveDeclarations (PR #108241)

2024-10-06 Thread Brad House via cfe-commits
@@ -20010,6 +20010,17 @@ TEST_F(FormatTest, AlignConsecutiveDeclarations) { " return 0;\n" "}() };", BracedAlign); + + Alignment.AlignConsecutiveDeclarations.AlignFunctionDeclarations = false; + verifyFormat("unsigned int f1(void)

[clang] clang-format: Add AlignFunctionDeclarations attribute to AlignConsecutiveDeclarations (PR #108241)

2024-10-06 Thread Brad House via cfe-commits
@@ -305,37 +305,43 @@ TEST(ConfigParseTest, ParsesConfiguration) { FormatStyle::AlignConsecutiveStyle( \ {/*Enabled=*/false, /*AcrossEmptyLines=*/false, \ /*AcrossComments=*/false, /*AlignC

[clang] clang-format: Add AlignFunctionDeclarations attribute to AlignConsecutiveDeclarations (PR #108241)

2024-10-06 Thread Brad House via cfe-commits
@@ -305,37 +305,43 @@ TEST(ConfigParseTest, ParsesConfiguration) { FormatStyle::AlignConsecutiveStyle( \ {/*Enabled=*/false, /*AcrossEmptyLines=*/false, \ /*AcrossComments=*/false, /*AlignC

[clang] clang-format: Add AlignFunctionDeclarations attribute to AlignConsecutiveDeclarations (PR #108241)

2024-10-06 Thread Brad House via cfe-commits
@@ -48,46 +48,62 @@ template <> struct MappingTraits { FormatStyle::AlignConsecutiveStyle( {/*Enabled=*/false, /*AcrossEmptyLines=*/false, /*AcrossComments=*/false, /*AlignCompound=*/false, - /*AlignF

[clang] clang-format: Add AlignFunctionDeclarations attribute to AlignConsecutiveDeclarations (PR #108241)

2024-10-06 Thread Brad House via cfe-commits
@@ -48,46 +48,62 @@ template <> struct MappingTraits { FormatStyle::AlignConsecutiveStyle( {/*Enabled=*/false, /*AcrossEmptyLines=*/false, /*AcrossComments=*/false, /*AlignCompound=*/false, - /*AlignF

[clang] clang-format: Add AlignFunctionDeclarations attribute to AlignConsecutiveDeclarations (PR #108241)

2024-10-06 Thread Brad House via 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/3] Add AlignFunctionDeclarations attribute to AlignConsecutiveDe

[clang] clang-format: Add AlignFunctionDeclarations attribute to AlignConsecutiveDeclarations (PR #108241)

2024-10-05 Thread Brad House via cfe-commits
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

[clang] clang-format: Add AlignFunctionDeclarations attribute to AlignConsecutiveDeclarations (PR #108241)

2024-09-22 Thread Brad House via 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); +

[clang] clang-format: Add AlignFunctionDeclarations attribute to AlignConsecutiveDeclarations (PR #108241)

2024-09-22 Thread Brad House via 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/2] Add AlignFunctionDeclarations attribute to AlignConsecutiveDe

[clang] clang-format: Add AlignFunctionDeclarations attribute to AlignConsecutiveDeclarations (PR #108241)

2024-09-22 Thread Brad House via cfe-commits
@@ -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

[clang] clang-format: Add AlignFunctionDeclarations attribute to AlignConsecutiveDeclarations (PR #108241)

2024-09-22 Thread Brad House via 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); +

[clang] clang-format: Add AlignFunctionDeclarations attribute to AlignConsecutiveDeclarations (PR #108241)

2024-09-22 Thread Brad House via 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); +

[clang] clang-format: Add AlignFunctionDeclarations attribute to AlignConsecutiveDeclarations (PR #108241)

2024-09-22 Thread Brad House via cfe-commits
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 _

[clang] clang-format: Add AlignFunctionDeclarations attribute to AlignConsecutiveDeclarations (PR #108241)

2024-09-18 Thread Brad House via 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] Add AlignFunctionDeclarations attribute to AlignConsecutiveDeclar

[clang] clang-format: Add AlignFunctionDeclarations attribute to AlignConsecutiveDeclarations (PR #108241)

2024-09-18 Thread Brad House via cfe-commits
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

[clang] clang-format: Add AlignFunctionDeclarations attribute to AlignConsecutiveDeclarations (PR #108241)

2024-09-18 Thread Brad House via cfe-commits
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

[clang] clang-format: Add AlignFunctionDeclarations attribute to AlignConsecutiveDeclarations (PR #108241)

2024-09-18 Thread Brad House via cfe-commits
@@ -265,6 +279,7 @@ struct FormatStyle { AcrossComments == R.AcrossComments && AlignCompound == R.AlignCompound && AlignFunctionPointers == R.AlignFunctionPointers && + AlignFunctionDeclarations == R.AlignFunctionDeclarations &

[clang] clang-format: Add AlignFunctionDeclarations attribute to AlignConsecutiveDeclarations (PR #108241)

2024-09-18 Thread Brad House via cfe-commits
@@ -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

[clang] clang-format: Add AlignFunctionDeclarations attribute to AlignConsecutiveDeclarations (PR #108241)

2024-09-18 Thread Brad House via 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 1/2] Add AlignFunctionDeclarations attribute to AlignConsecutiveDe

[clang] clang-format: Add AlignFunctionDeclarations attribute to AlignConsecutiveDeclarations (PR #108241)

2024-09-18 Thread Brad House via cfe-commits
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

[clang] clang-format: Add AlignFunctionDeclarations attribute to AlignConsecutiveDeclarations (PR #108241)

2024-09-18 Thread Brad House via cfe-commits
@@ -1448,6 +1464,7 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind Language) { LLVMStyle.AlignConsecutiveAssignments.PadOperators = true; LLVMStyle.AlignConsecutiveBitFields = {}; LLVMStyle.AlignConsecutiveDeclarations = {}; + LLVMStyle.AlignConsecutiveDeclaration

[clang] clang-format: Add AlignFunctionDeclarations attribute to AlignConsecutiveDeclarations (PR #108241)

2024-09-12 Thread Brad House via cfe-commits
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

[clang] clang-format: Add AlignFunctionDeclarations attribute to AlignConsecutiveDeclarations (PR #108241)

2024-09-12 Thread Brad House via 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

[clang] clang-format: Add AlignFunctionDeclarations attribute to AlignConsecutiveDeclarations (PR #108241)

2024-09-11 Thread Brad House via cfe-commits
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

[clang] Add AlignFunctionDeclarations attribute to AlignConsecutiveDeclarations (PR #108241)

2024-09-11 Thread Brad House via 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