[PATCH] D110833: [clang-format] Add ControlStatementsAndFunctionDefinitionsExceptControlMacros option to SpaceBeforeParens

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 1 02:59:02 PDT 2021


MyDeveloperDay added inline comments.


================
Comment at: clang/docs/ClangFormatStyleOptions.rst:3649
     ``SBPO_ControlStatementsExceptForEachMacros`` remains an alias for
     backward compatibility.
 
----------------
Now I look back here, why where these Macro considered the same as for loops? why would we want

```
for (....)
Q_FOREACH(...)
```

So this really does need a struct or we'll be eventually be adding

`SBPO_ControlStatementsAndFunctionDefinitionsExceptControlMacrosButNotIfAndDefinatelyWhilesAndSometimesSwitchButOnlyOnTheSecondThursdayOfTheMonth`

```
SpaceBeforeParen:
     AfterFunctionDefinitionName: false
     AfterFunctionDeclarationName: true
     AfterSwitch: true
     AfterForeachMacros: false
     .... (there are likely others)
```
     
`







Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110833/new/

https://reviews.llvm.org/D110833



More information about the cfe-commits mailing list