[clang] [clang-format] Add SpacesInParensOption for attributes and filtering for repeated parens (PR #77522)

Owen Pan via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 20 14:10:28 PST 2024


owenca wrote:

> Covering all double parens in a single sub-option is not precise enough for code bases that may want to have `__attribute__(( x ))` but also allow `if ( ( x ) )`.

We should not go overboard with supporting all kinds of options/suboptions imaginable. I don't think we should support spaces between consecutive parens in the first place, which was likely a bug.

We can't just disregard the long-standing [policy](https://clang.llvm.org/docs/ClangFormatStyleOptions.html#adding-additional-style-options) on adding new options. If anyone thinks that policy is outdated, they should go through the RFC process and get it updated.

https://github.com/llvm/llvm-project/pull/77522


More information about the cfe-commits mailing list