[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
Fri Jun 14 00:21:54 PDT 2024
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.InEmptyParentheses = true;` should be after this patch? I make `Never` default value now, so `SpacesInParensOptions.InEmptyParentheses` wouldn't insert a space into empty braces after this patch if it's without enabling `SpaceInEmptyBraces`
> I would implement all that make sense or are applicable to WebKit.
TBH, I'm not sure how much braces are classified on config, I will consult concretely, but `WebKit` style may be `SpaceInEmptyBraces: Always`. Can I leave them to you? Thank you!
https://github.com/llvm/llvm-project/pull/93634
More information about the cfe-commits
mailing list