https://github.com/khei4 edited https://github.com/llvm/llvm-project/pull/93634
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/khei4 updated https://github.com/llvm/llvm-project/pull/93634
>From 079f6d29c1091b89e949d674b1983bb6e08155df Mon Sep 17 00:00:00 2001
From: Kohei Asano
Date: Mon, 3 Jun 2024 09:15:44 +0900
Subject: [PATCH 1/2] [clang-format] add an option to insert a space only for
empty brac
khei4 wrote:
rebased but still required to be tested and fix again
https://github.com/llvm/llvm-project/pull/93634
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/khei4 converted_to_draft
https://github.com/llvm/llvm-project/pull/93634
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/khei4 updated https://github.com/llvm/llvm-project/pull/93634
>From 079f6d29c1091b89e949d674b1983bb6e08155df Mon Sep 17 00:00:00 2001
From: Kohei Asano
Date: Mon, 3 Jun 2024 09:15:44 +0900
Subject: [PATCH] [clang-format] add an option to insert a space only for empty
braces
khei4 wrote:
I confirmed [the update of WebKit Code Style Guideline for empty
braces](https://github.com/WebKit/WebKit/pull/29668). I make WebKit style
insert a space in any empty braces. I also updated document by script.
https://github.com/llvm/llvm-project/pull/93634
___
https://github.com/khei4 updated https://github.com/llvm/llvm-project/pull/93634
>From c4932b225fefc6adc0bfe158e4ccba5f249baf94 Mon Sep 17 00:00:00 2001
From: Kohei Asano
Date: Mon, 3 Jun 2024 09:15:44 +0900
Subject: [PATCH] [clang-format] add an option to insert a space only for empty
braces
https://github.com/khei4 updated https://github.com/llvm/llvm-project/pull/93634
>From 8018dafc9878bcf3ad5f041dc90d9908b816925f Mon Sep 17 00:00:00 2001
From: Kohei Asano
Date: Mon, 3 Jun 2024 09:15:44 +0900
Subject: [PATCH] [clang-format] add an option to insert a space only for empty
braces
https://github.com/khei4 ready_for_review
https://github.com/llvm/llvm-project/pull/93634
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
khei4 wrote:
@owenca Thank you for the review!
> @khei4 maybe an enum for SpaceInEmptyBraces with Always, Never, and Custom.
> (IMO Leave doesn't make sense.)
I make those variants. How do you think the behavior of config, which has only
` SpaceInEmptyBraces.SpacesInParensOptions.InEmptyPar
https://github.com/khei4 updated https://github.com/llvm/llvm-project/pull/93634
>From 02b4de5799efe104f352d3f586e8779c5cd4 Mon Sep 17 00:00:00 2001
From: Kohei Asano
Date: Mon, 3 Jun 2024 09:15:44 +0900
Subject: [PATCH] [clang-format] add an option to insert a space only for empty
braces
https://github.com/khei4 edited https://github.com/llvm/llvm-project/pull/93634
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1864,7 +1894,11 @@ FormatStyle getWebKitStyle() {
Style.ObjCSpaceAfterProperty = true;
Style.PointerAlignment = FormatStyle::PAS_Left;
Style.SpaceBeforeCpp11BracedList = true;
- Style.SpaceInEmptyBlock = true;
+ Style.SpaceInEmptyBraces = FormatStyle::SIEBO_Custom;
https://github.com/khei4 updated https://github.com/llvm/llvm-project/pull/93634
>From 4f25089286e85682d79f78b3168138d7d2450142 Mon Sep 17 00:00:00 2001
From: Kohei Asano
Date: Mon, 3 Jun 2024 09:15:44 +0900
Subject: [PATCH] [clang-format] add an option to insert a space only for empty
braces
https://github.com/khei4 updated https://github.com/llvm/llvm-project/pull/93634
>From 64e557f1b5e6dcf3b0ac78c83d4bef3d6cd8f7ba Mon Sep 17 00:00:00 2001
From: Kohei Asano
Date: Mon, 3 Jun 2024 09:15:44 +0900
Subject: [PATCH] [clang-format] add an option to insert a space only for empty
braces
https://github.com/khei4 updated https://github.com/llvm/llvm-project/pull/93634
>From 447e0e46620281b2a6604ed7a79b473105f8ebe1 Mon Sep 17 00:00:00 2001
From: Kohei Asano
Date: Mon, 3 Jun 2024 09:15:44 +0900
Subject: [PATCH] [clang-format] add an option to insert a space only for empty
braces
https://github.com/khei4 converted_to_draft
https://github.com/llvm/llvm-project/pull/93634
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/khei4 edited https://github.com/llvm/llvm-project/pull/93634
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/khei4 edited https://github.com/llvm/llvm-project/pull/93634
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/khei4 edited https://github.com/llvm/llvm-project/pull/93634
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1864,7 +1894,11 @@ FormatStyle getWebKitStyle() {
Style.ObjCSpaceAfterProperty = true;
Style.PointerAlignment = FormatStyle::PAS_Left;
Style.SpaceBeforeCpp11BracedList = true;
- Style.SpaceInEmptyBlock = true;
+ Style.SpaceInEmptyBraces = FormatStyle::SIEBO_Custom;
@@ -187,7 +187,6 @@ TEST(ConfigParseTest, ParsesConfigurationBools) {
CHECK_PARSE_BOOL(RemoveSemicolon);
CHECK_PARSE_BOOL(SkipMacroDefinitionBody);
CHECK_PARSE_BOOL(SpacesInSquareBrackets);
- CHECK_PARSE_BOOL(SpaceInEmptyBlock);
khei4 wrote:
Yeah, it's
https://github.com/khei4 updated https://github.com/llvm/llvm-project/pull/93634
>From 4cdd7bd2a916740f886939d1ec0395b5915eb3c2 Mon Sep 17 00:00:00 2001
From: Kohei Asano
Date: Mon, 3 Jun 2024 09:15:44 +0900
Subject: [PATCH 1/2] [clang-format] add an option to insert a space only for
empty brac
khei4 wrote:
I added more coarse braces options. I'm grad if you take a look ;)
https://github.com/llvm/llvm-project/pull/93634
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/khei4 ready_for_review
https://github.com/llvm/llvm-project/pull/93634
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/khei4 updated https://github.com/llvm/llvm-project/pull/93634
>From 4cdd7bd2a916740f886939d1ec0395b5915eb3c2 Mon Sep 17 00:00:00 2001
From: Kohei Asano
Date: Mon, 3 Jun 2024 09:15:44 +0900
Subject: [PATCH] [clang-format] add an option to insert a space only for empty
braces
https://github.com/khei4 updated https://github.com/llvm/llvm-project/pull/93634
>From 1a953e35c2996e31c526e0caf0bbbecaf13c1c63 Mon Sep 17 00:00:00 2001
From: Kohei Asano
Date: Mon, 3 Jun 2024 09:15:44 +0900
Subject: [PATCH] [clang-format] add an option to insert a space only for empty
braces
https://github.com/khei4 updated https://github.com/llvm/llvm-project/pull/93634
>From c0138dfe4f2cf3d9925fac46b3ba7d9a9963820a Mon Sep 17 00:00:00 2001
From: Kohei Asano
Date: Mon, 3 Jun 2024 09:15:44 +0900
Subject: [PATCH] [clang-format] add an option to insert a space only for empty
braces
https://github.com/khei4 updated https://github.com/llvm/llvm-project/pull/93634
>From 5d409bcd0966a7581effdf1488c2f4cfa32aebc6 Mon Sep 17 00:00:00 2001
From: Kohei Asano
Date: Mon, 3 Jun 2024 09:15:44 +0900
Subject: [PATCH] [clang-format] add an option to insert a space only for empty
braces
https://github.com/khei4 updated https://github.com/llvm/llvm-project/pull/93634
>From b55d09f4baa5f0a5cbe9b2614c23cc0ab5f2ef58 Mon Sep 17 00:00:00 2001
From: Kohei Asano
Date: Mon, 3 Jun 2024 09:15:44 +0900
Subject: [PATCH] [clang-format] add an option to insert a space only for empty
braces
https://github.com/khei4 converted_to_draft
https://github.com/llvm/llvm-project/pull/93634
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/khei4 updated https://github.com/llvm/llvm-project/pull/93634
>From 0b41025a9ba677caf694f65620ce4a7b9aae2265 Mon Sep 17 00:00:00 2001
From: Kohei Asano
Date: Wed, 29 May 2024 11:40:39 +0900
Subject: [PATCH] [clang-format] add an option to insert a space only for empty
braces
https://github.com/khei4 edited https://github.com/llvm/llvm-project/pull/93634
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/khei4 edited https://github.com/llvm/llvm-project/pull/93634
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4682,18 +4693,20 @@ struct FormatStyle {
SpacesInParensCustom()
khei4 wrote:
Thanks for a good catch! I think more correspondence with [`.clang-format`
](https://github.com/WebKit/WebKit/blob/main/.clang-format) and `basedOnStyle:
WebKit`, and WebKit
@@ -14027,6 +14027,11 @@ TEST_F(FormatTest, LayoutCxx11BraceInitializers) {
SpaceBetweenBraces.SpacesInParens = FormatStyle::SIPO_Custom;
SpaceBetweenBraces.SpacesInParensOptions.InEmptyParentheses = true;
verifyFormat("vector< int > x{ };", SpaceBetweenBraces);
+ SpaceB
https://github.com/khei4 edited https://github.com/llvm/llvm-project/pull/93634
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/khei4 updated https://github.com/llvm/llvm-project/pull/93634
>From f9022ddba4dd26dea5d04dbcd3c256d2d42b3bad Mon Sep 17 00:00:00 2001
From: Kohei Asano
Date: Wed, 29 May 2024 11:40:39 +0900
Subject: [PATCH 1/2] [clang-format] add an option to insert a space only for
empty bra
https://github.com/khei4 edited https://github.com/llvm/llvm-project/pull/93634
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -6237,18 +6237,30 @@ the configuration (without a prefix: ``Auto``).
true: false:
x = ( int32 )y vs. x = (int32)y
- * ``bool InEmptyParentheses`` Put a space in parentheses only if the
parentheses are empt
@@ -6237,18 +6237,30 @@ the configuration (without a prefix: ``Auto``).
true: false:
x = ( int32 )y vs. x = (int32)y
- * ``bool InEmptyParentheses`` Put a space in parentheses only if the
parentheses are empt
https://github.com/khei4 edited https://github.com/llvm/llvm-project/pull/93634
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/khei4 edited https://github.com/llvm/llvm-project/pull/93634
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/khei4 created https://github.com/llvm/llvm-project/pull/93634
# What
This patch introduces an option to insert a space between empty braces,
especially for empty initializer.
# Motivation
WebKit has [its own `.clang-format`
](https://github.com/WebKit/WebKit/blob/main/.cla
https://github.com/khei4 closed https://github.com/llvm/llvm-project/pull/70427
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/khei4 updated https://github.com/llvm/llvm-project/pull/70427
>From 12e29c46366e93c98c96e7561258bc83f66755c1 Mon Sep 17 00:00:00 2001
From: khei4
Date: Fri, 27 Oct 2023 17:46:34 +0900
Subject: [PATCH 1/2] use create instead of protected Constructor
---
clang/docs/LibTooling.
https://github.com/khei4 ready_for_review
https://github.com/llvm/llvm-project/pull/70427
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/khei4 updated https://github.com/llvm/llvm-project/pull/70427
>From 12e29c46366e93c98c96e7561258bc83f66755c1 Mon Sep 17 00:00:00 2001
From: khei4
Date: Fri, 27 Oct 2023 17:46:34 +0900
Subject: [PATCH] use create instead of protected Constructor
---
clang/docs/LibTooling.rst
https://github.com/khei4 edited https://github.com/llvm/llvm-project/pull/70427
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/khei4 updated https://github.com/llvm/llvm-project/pull/70427
>From 166f580fda7a7cf4b87b167be03777d28638feff Mon Sep 17 00:00:00 2001
From: khei4
Date: Fri, 27 Oct 2023 17:46:34 +0900
Subject: [PATCH 1/2] use create instead of protected Constructor
---
clang/docs/LibTooling.
https://github.com/khei4 edited https://github.com/llvm/llvm-project/pull/70427
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/khei4 updated https://github.com/llvm/llvm-project/pull/70427
>From 166f580fda7a7cf4b87b167be03777d28638feff Mon Sep 17 00:00:00 2001
From: khei4
Date: Fri, 27 Oct 2023 17:46:34 +0900
Subject: [PATCH] use create instead of protected Constructor
---
clang/docs/LibTooling.rst
https://github.com/khei4 updated https://github.com/llvm/llvm-project/pull/70427
>From f9f61fd520727d1e03269af4b5c1e40119d7524e Mon Sep 17 00:00:00 2001
From: khei4
Date: Fri, 27 Oct 2023 17:46:34 +0900
Subject: [PATCH] use: create instead of protected Constructor
handle: expected
fix: later e
https://github.com/khei4 updated https://github.com/llvm/llvm-project/pull/70427
>From 1ae7edddc79a0e96fd4b142d09b0752aa3d9ff85 Mon Sep 17 00:00:00 2001
From: khei4
Date: Fri, 27 Oct 2023 17:46:34 +0900
Subject: [PATCH] use: create instead of protected Constructor
handle: expected
---
clang/do
https://github.com/khei4 converted_to_draft
https://github.com/llvm/llvm-project/pull/70427
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/khei4 created https://github.com/llvm/llvm-project/pull/70427
This patch fixes the code example on CommonOptionParser on
https://intel.github.io/llvm-docs/clang/LibTooling.html
CommonOptionParser's constructor is protected and we can use
`CommonOptionParser::create` instead
56 matches
Mail list logo