enum FormatStyle::SpaceBeforeParensStyle

Description

Different ways to put a space before opening parentheses.

Declared at: clang/include/clang/Format/Format.h:3389

Enumerators

NameValueComment
SBPO_Never0Never put a space before opening parentheses.
SBPO_ControlStatements1Put a space before opening parentheses only after control statement keywords (``for/if/while...``).
SBPO_ControlStatementsExceptControlMacros2Same 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_NonEmptyParentheses3Put a space before opening parentheses only if the parentheses are not empty i.e. '()'
SBPO_Always4Always 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_Custom5Configure each individual space before parentheses in `SpaceBeforeParensOptions`.