@@ -1022,7 +1028,10 @@ void WhitespaceManager::alignConsecutiveDeclarations() {
if (C.Tok->is(TT_FunctionDeclarationName))
return Style.AlignConsecutiveDeclarations.AlignFunctionDeclarations;
if (C.Tok->isNot(TT_StartOfName))
- return false;
+
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/109497
>From 38333491868dfad9c84719d9dd8fd872a2aa7584 Mon Sep 17 00:00:00 2001
From: Jesse Harvey
Date: Fri, 20 Sep 2024 16:40:35 -0700
Subject: [PATCH 1/4] Add support for aligning BlockComments in declarations
---
c
@@ -20029,6 +20029,52 @@ TEST_F(FormatTest, AlignConsecutiveDeclarations) {
Alignment);
}
+TEST_F(FormatTest, AlignConsecutiveDeclarationsBlockComments) {
+ FormatStyle Style = getLLVMStyleWithColumns(80);
+ Style.AlignConsecutiveDeclarations.Enabled = true;
+
https://github.com/JessehMSFT updated
https://github.com/llvm/llvm-project/pull/109497
>From 38333491868dfad9c84719d9dd8fd872a2aa7584 Mon Sep 17 00:00:00 2001
From: Jesse Harvey
Date: Fri, 20 Sep 2024 16:40:35 -0700
Subject: [PATCH 1/4] Add support for aligning BlockComments in declarations
--
https://github.com/JessehMSFT updated
https://github.com/llvm/llvm-project/pull/109497
>From 38333491868dfad9c84719d9dd8fd872a2aa7584 Mon Sep 17 00:00:00 2001
From: Jesse Harvey
Date: Fri, 20 Sep 2024 16:40:35 -0700
Subject: [PATCH 1/3] Add support for aligning BlockComments in declarations
--
https://github.com/owenca edited
https://github.com/llvm/llvm-project/pull/109497
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca edited
https://github.com/llvm/llvm-project/pull/109497
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -89,6 +99,7 @@ template <> struct
MappingTraits {
Value.AlignFunctionDeclarations);
IO.mapOptional("AlignFunctionPointers", Value.AlignFunctionPointers);
IO.mapOptional("PadOperators", Value.PadOperators);
+IO.mapOptional("AlignBlockComments",
@@ -20029,6 +20029,52 @@ TEST_F(FormatTest, AlignConsecutiveDeclarations) {
Alignment);
}
+TEST_F(FormatTest, AlignConsecutiveDeclarationsBlockComments) {
+ FormatStyle Style = getLLVMStyleWithColumns(80);
owenca wrote:
```suggestion
auto St
@@ -275,13 +275,36 @@ struct FormatStyle {
/// bbb >>= 2;
/// \endcode
bool PadOperators;
+/// Only for ``AlignConsecutiveDeclarations``. Whether block comments
+/// are aligned in declarations.
+/// \code
+/// true:
+/// someLongFunction(
@@ -275,13 +275,36 @@ struct FormatStyle {
/// bbb >>= 2;
/// \endcode
bool PadOperators;
+/// Only for ``AlignConsecutiveDeclarations``. Whether block comments
+/// are aligned in declarations.
+/// \code
+/// true:
+/// someLongFunction(
@@ -20272,14 +20318,16 @@ TEST_F(FormatTest, AlignWithLineBreaks) {
/*AcrossComments=*/false, /*AlignCompound=*/false,
/*AlignFunctionDeclarations=*/false,
/*AlignFunctionPointers=*/false,
- /*PadOperators=*/tru
@@ -302,44 +302,44 @@ TEST(ConfigParseTest, ParsesConfiguration) {
Style.FIELD.Enabled = true;
\
CHECK_PARSE(#FIELD ": None", FIELD,
\
FormatStyle::AlignConsecutiveSt
@@ -348,6 +348,7 @@ TEST(ConfigParseTest, ParsesConfiguration) {
CHECK_PARSE_NESTED_BOOL(FIELD, AlignFunctionDeclarations);
\
CHECK_PARSE_NESTED_BOOL(FIELD, AlignFunctionPointers);
\
CHECK_PARSE_NESTED_BOOL(FIELD, PadOperators);
@@ -302,44 +302,44 @@ TEST(ConfigParseTest, ParsesConfiguration) {
Style.FIELD.Enabled = true;
\
CHECK_PARSE(#FIELD ": None", FIELD,
\
FormatStyle::AlignConsecutiveSt
@@ -20272,14 +20318,16 @@ TEST_F(FormatTest, AlignWithLineBreaks) {
/*AcrossComments=*/false, /*AlignCompound=*/false,
/*AlignFunctionDeclarations=*/false,
/*AlignFunctionPointers=*/false,
- /*PadOperators=*/tru
@@ -50,33 +50,43 @@ template <> struct
MappingTraits {
{/*Enabled=*/true, /*AcrossEmptyLines=*/false,
/*AcrossComments=*/false, /*AlignCompound=*/false,
owenca wrote:
```suggestion
/*AcrossComments=
@@ -275,13 +275,36 @@ struct FormatStyle {
/// bbb >>= 2;
/// \endcode
bool PadOperators;
+/// Only for ``AlignConsecutiveDeclarations``. Whether block comments
+/// are aligned in declarations.
+/// \code
+/// true:
+/// someLongFunction(
@@ -275,13 +275,36 @@ struct FormatStyle {
/// bbb >>= 2;
/// \endcode
bool PadOperators;
+/// Only for ``AlignConsecutiveDeclarations``. Whether block comments
+/// are aligned in declarations.
+/// \code
+/// true:
+/// someLongFunction(
@@ -20029,6 +20029,52 @@ TEST_F(FormatTest, AlignConsecutiveDeclarations) {
Alignment);
}
+TEST_F(FormatTest, AlignConsecutiveDeclarationsBlockComments) {
+ FormatStyle Style = getLLVMStyleWithColumns(80);
+ Style.AlignConsecutiveDeclarations.Enabled = true;
+
@@ -50,33 +50,43 @@ template <> struct
MappingTraits {
{/*Enabled=*/true, /*AcrossEmptyLines=*/false,
/*AcrossComments=*/false, /*AlignCompound=*/false,
/*AlignFunctionDeclarations=*/true,
- /*Al
https://github.com/owenca requested changes to this pull request.
Please update the release notes.
https://github.com/llvm/llvm-project/pull/109497
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/
https://github.com/owenca edited
https://github.com/llvm/llvm-project/pull/109497
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
JessehMSFT wrote:
Friendly ping @mydeveloperday
https://github.com/llvm/llvm-project/pull/109497
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/JessehMSFT updated
https://github.com/llvm/llvm-project/pull/109497
>From 38333491868dfad9c84719d9dd8fd872a2aa7584 Mon Sep 17 00:00:00 2001
From: Jesse Harvey
Date: Fri, 20 Sep 2024 16:40:35 -0700
Subject: [PATCH 1/3] Add support for aligning BlockComments in declarations
--
https://github.com/JessehMSFT updated
https://github.com/llvm/llvm-project/pull/109497
>From 38333491868dfad9c84719d9dd8fd872a2aa7584 Mon Sep 17 00:00:00 2001
From: Jesse Harvey
Date: Fri, 20 Sep 2024 16:40:35 -0700
Subject: [PATCH 1/3] Add support for aligning BlockComments in declarations
--
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff d2457e6d8f62a12b3b74791cfd3f5808168c8a71
526a16a6b9692ddc121f4324e5e50653b75d82e9 --e
https://github.com/JessehMSFT updated
https://github.com/llvm/llvm-project/pull/109497
>From 38333491868dfad9c84719d9dd8fd872a2aa7584 Mon Sep 17 00:00:00 2001
From: Jesse Harvey
Date: Fri, 20 Sep 2024 16:40:35 -0700
Subject: [PATCH 1/2] Add support for aligning BlockComments in declarations
--
JessehMSFT wrote:
Ping
https://github.com/llvm/llvm-project/pull/109497
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
JessehMSFT wrote:
> You have not regenerated the rst
Thank you for flagging @mydeveloperday, I have regenerated
ClangFormatStyleOptions.rst via dump_format_style.py and pushed an update.
https://github.com/llvm/llvm-project/pull/109497
___
cfe-commit
https://github.com/JessehMSFT updated
https://github.com/llvm/llvm-project/pull/109497
>From 38333491868dfad9c84719d9dd8fd872a2aa7584 Mon Sep 17 00:00:00 2001
From: Jesse Harvey
Date: Fri, 20 Sep 2024 16:40:35 -0700
Subject: [PATCH 1/2] Add support for aligning BlockComments in declarations
--
https://github.com/mydeveloperday requested changes to this pull request.
You have not regenerated the rst
https://github.com/llvm/llvm-project/pull/109497
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/
llvmbot wrote:
@llvm/pr-subscribers-clang-format
Author: None (JessehMSFT)
Changes
There are two primary scenarios where our team uses block comments in function
declarations.
1. To comment out unused parameters
2. To provide additional context when passing an unnamed parameter
Clang-fo
https://github.com/JessehMSFT ready_for_review
https://github.com/llvm/llvm-project/pull/109497
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/JessehMSFT updated
https://github.com/llvm/llvm-project/pull/109497
>From 38333491868dfad9c84719d9dd8fd872a2aa7584 Mon Sep 17 00:00:00 2001
From: Jesse Harvey
Date: Fri, 20 Sep 2024 16:40:35 -0700
Subject: [PATCH] Add support for aligning BlockComments in declarations
---
c
github-actions[bot] wrote:
Thank you for submitting a Pull Request (PR) to the LLVM Project!
This PR will be automatically labeled and the relevant teams will be notified.
If you wish to, you can add reviewers by using the "Reviewers" section on this
page.
If this is not working for you, it
https://github.com/JessehMSFT created
https://github.com/llvm/llvm-project/pull/109497
There are two primary scenarios where our team uses block comments in function
declarations.
1. To comment out unused parameters
2. To provide additional context when passing an unnamed parameter
Clang-form
37 matches
Mail list logo