enum FormatStyle::SpaceBeforeParensStyle
Description
Different ways to put a space before opening parentheses.
Declared at: clang/include/clang/Format/Format.h:3389
Enumerators
Name | Value | Comment |
---|---|---|
SBPO_Never | 0 | Never put a space before opening parentheses. |
SBPO_ControlStatements | 1 | Put a space before opening parentheses only after control statement keywords (``for/if/while...``). |
SBPO_ControlStatementsExceptControlMacros | 2 | Same as ``SBPO_ControlStatements`` except this option doesn't apply to ForEach and If macros. This is useful in projects where ForEach/If macros are treated as function calls instead of control statements. ``SBPO_ControlStatementsExceptForEachMacros`` remains an alias for backward compatibility. |
SBPO_NonEmptyParentheses | 3 | Put a space before opening parentheses only if the parentheses are not empty i.e. '()' |
SBPO_Always | 4 | Always put a space before opening parentheses, except when it's prohibited by the syntax rules (in function-like macro definitions) or when determined by other style rules (after unary operators, opening parentheses, etc.) |
SBPO_Custom | 5 | Configure each individual space before parentheses in `SpaceBeforeParensOptions`. |