[clang] [clang-format] add an option to insert a space only for non-code block empty braces, not for empty parentheses (PR #93634)
Owen Pan via cfe-commits
cfe-commits at lists.llvm.org
Sun Jun 9 17:12:23 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;
----------------
owenca wrote:
IMO we need to go by the published [WebKit coding style](https://webkit.org/code-style-guidelines/), not the script.
https://github.com/llvm/llvm-project/pull/93634
More information about the cfe-commits
mailing list