https://github.com/galenelias created
https://github.com/llvm/llvm-project/pull/123010
AllowShortNamespacesOnASingleLine assumes that there is no newline before the
namespace brace, however, there is no actual reason this shouldn't be
compatible with BraceWrapping.AfterNamespace = true.
This
https://github.com/galenelias updated
https://github.com/llvm/llvm-project/pull/105597
>From 93eb3d89652607173f4f68fce7dcc5b2bd33f266 Mon Sep 17 00:00:00 2001
From: Galen Elias
Date: Wed, 21 Aug 2024 16:33:42 -0700
Subject: [PATCH 01/16] clang-format: Add "AllowShortNamespacesOnASingleLine"
op
@@ -4504,6 +4504,16 @@ TEST_F(FormatTest, FormatsCompactNamespaces) {
"} // namespace bb\n"
"} // namespace aa",
Style);
+
+ verifyFormat("namespace a { namespace b { namespace c {\n"
+ "}}} // namespace a::b::
https://github.com/galenelias updated
https://github.com/llvm/llvm-project/pull/105597
>From 93eb3d89652607173f4f68fce7dcc5b2bd33f266 Mon Sep 17 00:00:00 2001
From: Galen Elias
Date: Wed, 21 Aug 2024 16:33:42 -0700
Subject: [PATCH 01/15] clang-format: Add "AllowShortNamespacesOnASingleLine"
op
https://github.com/galenelias updated
https://github.com/llvm/llvm-project/pull/105597
>From 93eb3d89652607173f4f68fce7dcc5b2bd33f266 Mon Sep 17 00:00:00 2001
From: Galen Elias
Date: Wed, 21 Aug 2024 16:33:42 -0700
Subject: [PATCH 01/14] clang-format: Add "AllowShortNamespacesOnASingleLine"
op
@@ -616,6 +627,63 @@ class LineJoiner {
return 1;
}
+ unsigned tryMergeNamespace(SmallVectorImpl::const_iterator
I,
+ SmallVectorImpl::const_iterator
E,
+ unsigned Limit) {
+if (Limit == 0)
+ return 0;
+
galenelias wrote:
Ping
https://github.com/llvm/llvm-project/pull/105597
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/galenelias updated
https://github.com/llvm/llvm-project/pull/105597
>From 4118b7dde9adbee7b6aaf5d094d34cb6b64f6c77 Mon Sep 17 00:00:00 2001
From: Galen Elias
Date: Wed, 21 Aug 2024 16:33:42 -0700
Subject: [PATCH 01/12] clang-format: Add "AllowShortNamespacesOnASingleLine"
op
galenelias wrote:
> I don't think we want to add any tests whose formats are questionable or
> still under discussion. WDYT @mydeveloperday @HazardyKnusperkeks @rymiel ?
Ok, that's fair. I have removed these tests. Thanks for the detailed response
and context.
https://github.com/llvm/llvm-p
https://github.com/galenelias updated
https://github.com/llvm/llvm-project/pull/105597
>From 4118b7dde9adbee7b6aaf5d094d34cb6b64f6c77 Mon Sep 17 00:00:00 2001
From: Galen Elias
Date: Wed, 21 Aug 2024 16:33:42 -0700
Subject: [PATCH 01/11] clang-format: Add "AllowShortNamespacesOnASingleLine"
op
galenelias wrote:
> I'm inclined to think that all the AllowShort options should work the same
> way whether ColumnLimit is 0. However, a couple of them I checked
> (AllowShortLoops and AllowShortBlocks) have no effect unless set to false. I
> suggest that we mark the test as a FIXME or don't
https://github.com/galenelias updated
https://github.com/llvm/llvm-project/pull/105597
>From 4118b7dde9adbee7b6aaf5d094d34cb6b64f6c77 Mon Sep 17 00:00:00 2001
From: Galen Elias
Date: Wed, 21 Aug 2024 16:33:42 -0700
Subject: [PATCH 01/10] clang-format: Add "AllowShortNamespacesOnASingleLine"
op
galenelias wrote:
Ping
https://github.com/llvm/llvm-project/pull/105597
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/galenelias updated
https://github.com/llvm/llvm-project/pull/105597
>From 4118b7dde9adbee7b6aaf5d094d34cb6b64f6c77 Mon Sep 17 00:00:00 2001
From: Galen Elias
Date: Wed, 21 Aug 2024 16:33:42 -0700
Subject: [PATCH 1/9] clang-format: Add "AllowShortNamespacesOnASingleLine"
opti
@@ -27981,6 +27981,132 @@ TEST_F(FormatTest, BreakBinaryOperations) {
Style);
}
+TEST_F(FormatTest, ShortNamespacesOption) {
+ auto BaseStyle = getLLVMStyle();
+ BaseStyle.AllowShortNamespacesOnASingleLine = true;
+ BaseStyle.FixNamespaceComments = false;
+
+
https://github.com/galenelias updated
https://github.com/llvm/llvm-project/pull/105597
>From 4118b7dde9adbee7b6aaf5d094d34cb6b64f6c77 Mon Sep 17 00:00:00 2001
From: Galen Elias
Date: Wed, 21 Aug 2024 16:33:42 -0700
Subject: [PATCH 1/8] clang-format: Add "AllowShortNamespacesOnASingleLine"
opti
@@ -616,6 +626,62 @@ class LineJoiner {
return 1;
}
+ unsigned tryMergeNamespace(SmallVectorImpl::const_iterator
I,
+ SmallVectorImpl::const_iterator
E,
+ unsigned Limit) {
+if (Limit == 0)
+ return 0;
+
@@ -616,6 +626,62 @@ class LineJoiner {
return 1;
}
+ unsigned tryMergeNamespace(SmallVectorImpl::const_iterator
I,
+ SmallVectorImpl::const_iterator
E,
+ unsigned Limit) {
+if (Limit == 0)
g
@@ -27981,6 +27981,132 @@ TEST_F(FormatTest, BreakBinaryOperations) {
Style);
}
+TEST_F(FormatTest, ShortNamespacesOption) {
+ auto BaseStyle = getLLVMStyle();
+ BaseStyle.AllowShortNamespacesOnASingleLine = true;
+ BaseStyle.FixNamespaceComments = false;
+
+
@@ -616,6 +626,62 @@ class LineJoiner {
return 1;
}
+ unsigned tryMergeNamespace(SmallVectorImpl::const_iterator
I,
+ SmallVectorImpl::const_iterator
E,
+ unsigned Limit) {
+if (Limit == 0)
+ return 0;
+
https://github.com/galenelias deleted
https://github.com/llvm/llvm-project/pull/105597
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -27981,6 +27981,118 @@ TEST_F(FormatTest, BreakBinaryOperations) {
Style);
}
+TEST_F(FormatTest, ShortNamespacesOption) {
+ FormatStyle Style = getLLVMStyle();
+ Style.AllowShortNamespacesOnASingleLine = true;
+ Style.FixNamespaceComments = false;
+
+ //
https://github.com/galenelias updated
https://github.com/llvm/llvm-project/pull/105597
>From 4118b7dde9adbee7b6aaf5d094d34cb6b64f6c77 Mon Sep 17 00:00:00 2001
From: Galen Elias
Date: Wed, 21 Aug 2024 16:33:42 -0700
Subject: [PATCH 1/4] clang-format: Add "AllowShortNamespacesOnASingleLine"
opti
https://github.com/galenelias updated
https://github.com/llvm/llvm-project/pull/105597
>From 4118b7dde9adbee7b6aaf5d094d34cb6b64f6c77 Mon Sep 17 00:00:00 2001
From: Galen Elias
Date: Wed, 21 Aug 2024 16:33:42 -0700
Subject: [PATCH 1/3] clang-format: Add "AllowShortNamespacesOnASingleLine"
opti
https://github.com/galenelias updated
https://github.com/llvm/llvm-project/pull/105597
>From 4118b7dde9adbee7b6aaf5d094d34cb6b64f6c77 Mon Sep 17 00:00:00 2001
From: Galen Elias
Date: Wed, 21 Aug 2024 16:33:42 -0700
Subject: [PATCH 1/2] clang-format: Add "AllowShortNamespacesOnASingleLine"
opti
https://github.com/galenelias updated
https://github.com/llvm/llvm-project/pull/105597
>From 4118b7dde9adbee7b6aaf5d094d34cb6b64f6c77 Mon Sep 17 00:00:00 2001
From: Galen Elias
Date: Wed, 21 Aug 2024 16:33:42 -0700
Subject: [PATCH] clang-format: Add "AllowShortNamespacesOnASingleLine" option
T
https://github.com/galenelias updated
https://github.com/llvm/llvm-project/pull/105597
>From 3819c15c8c6258d1d29a38fcfb71db8567fb34e5 Mon Sep 17 00:00:00 2001
From: Galen Elias
Date: Wed, 21 Aug 2024 15:46:35 -0700
Subject: [PATCH] clang-format: Add "AllowShortNamespacesOnASingleLine" option
T
https://github.com/galenelias created
https://github.com/llvm/llvm-project/pull/105597
This addresses: https://github.com/llvm/llvm-project/issues/101363 which is a
resurrection of a previously opened but never completed review:
https://reviews.llvm.org/D11851
The feature is to allow code lik
28 matches
Mail list logo