[clang] [clang-format] add an option to insert a space only for non-code block empty braces, not for empty parentheses (PR #93634)
Kohei Asano via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 13 23:46:14 PDT 2024
================
@@ -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;
+ Style.SpaceInEmptyBracesOptions.Block = true;
+ Style.SpaceInEmptyBracesOptions.InitList = true;
+ Style.SpacesInParensOptions.InEmptyParentheses = false;
----------------
khei4 wrote:
@owenca
Thank you. I found there are no entries about empty braces. I will consult on the WebKit mailing list about the inconsistency between Code Style Guideline and check-webkit-style script. I think it’s good to separate the WebKit Style fixes and empty braces options addition on this patch. Although I can’t still find how much this kind of inconsistency are there, I will file an issue if it’s necessary. :)
https://github.com/llvm/llvm-project/pull/93634
More information about the cfe-commits
mailing list