clang 20.0.0git
Public Member Functions | Public Attributes | List of all members
clang::format::FormatStyle::SpaceBeforeParensCustom Struct Reference

Precise control over the spacing before parentheses. More...

#include "clang/Format/Format.h"

Public Member Functions

 SpaceBeforeParensCustom ()
 
bool operator== (const SpaceBeforeParensCustom &Other) const
 

Public Attributes

bool AfterControlStatements
 If true, put space between control statement keywords (for/if/while...) and opening parentheses.
 
bool AfterForeachMacros
 If true, put space between foreach macros and opening parentheses.
 
bool AfterFunctionDeclarationName
 If true, put a space between function declaration name and opening parentheses.
 
bool AfterFunctionDefinitionName
 If true, put a space between function definition name and opening parentheses.
 
bool AfterIfMacros
 If true, put space between if macros and opening parentheses.
 
bool AfterOverloadedOperator
 If true, put a space between operator overloading and opening parentheses.
 
bool AfterPlacementOperator
 If true, put a space between operator new/delete and opening parenthesis.
 
bool AfterRequiresInClause
 If true, put space between requires keyword in a requires clause and opening parentheses, if there is one.
 
bool AfterRequiresInExpression
 If true, put space between requires keyword in a requires expression and opening parentheses.
 
bool BeforeNonEmptyParentheses
 If true, put a space before opening parentheses only if the parentheses are not empty.
 

Detailed Description

Precise control over the spacing before parentheses.

# Should be declared this way:
bool AfterControlStatements
If true, put space between control statement keywords (for/if/while...) and opening parentheses.
Definition: Format.h:4453
bool AfterFunctionDefinitionName
If true, put a space between function definition name and opening parentheses.
Definition: Format.h:4474
SpaceBeforeParensCustom SpaceBeforeParensOptions
Control of individual space before parentheses.
Definition: Format.h:4562
SpaceBeforeParensStyle SpaceBeforeParens
Defines in which cases to put a space before opening parentheses.
Definition: Format.h:4436

Definition at line 4446 of file Format.h.

Constructor & Destructor Documentation

◆ SpaceBeforeParensCustom()

clang::format::FormatStyle::SpaceBeforeParensCustom::SpaceBeforeParensCustom ( )
inline

Definition at line 4526 of file Format.h.

Member Function Documentation

◆ operator==()

bool clang::format::FormatStyle::SpaceBeforeParensCustom::operator== ( const SpaceBeforeParensCustom Other) const
inline

Member Data Documentation

◆ AfterControlStatements

bool clang::format::FormatStyle::SpaceBeforeParensCustom::AfterControlStatements

If true, put space between control statement keywords (for/if/while...) and opening parentheses.

true: false:
if (...) {} vs. if(...) {}

Definition at line 4453 of file Format.h.

Referenced by clang::format::expandPresetsSpaceBeforeParens(), clang::format::getLLVMStyle(), and operator==().

◆ AfterForeachMacros

bool clang::format::FormatStyle::SpaceBeforeParensCustom::AfterForeachMacros

If true, put space between foreach macros and opening parentheses.

true: false:
FOREACH (...) vs. FOREACH(...)
<loop-body> <loop-body>

Definition at line 4460 of file Format.h.

Referenced by clang::format::expandPresetsSpaceBeforeParens(), clang::format::getLLVMStyle(), and operator==().

◆ AfterFunctionDeclarationName

bool clang::format::FormatStyle::SpaceBeforeParensCustom::AfterFunctionDeclarationName

If true, put a space between function declaration name and opening parentheses.

true: false:
void f (); vs. void f();

Definition at line 4467 of file Format.h.

Referenced by operator==().

◆ AfterFunctionDefinitionName

bool clang::format::FormatStyle::SpaceBeforeParensCustom::AfterFunctionDefinitionName

If true, put a space between function definition name and opening parentheses.

true: false:
void f () {} vs. void f() {}

Definition at line 4474 of file Format.h.

Referenced by operator==().

◆ AfterIfMacros

bool clang::format::FormatStyle::SpaceBeforeParensCustom::AfterIfMacros

If true, put space between if macros and opening parentheses.

true: false:
IF (...) vs. IF(...)
<conditional-body> <conditional-body>

Definition at line 4481 of file Format.h.

Referenced by clang::format::expandPresetsSpaceBeforeParens(), clang::format::getLLVMStyle(), and operator==().

◆ AfterOverloadedOperator

bool clang::format::FormatStyle::SpaceBeforeParensCustom::AfterOverloadedOperator

If true, put a space between operator overloading and opening parentheses.

true: false:
void operator++ (int a); vs. void operator++(int a);
object.operator++ (10); object.operator++(10);

Definition at line 4489 of file Format.h.

Referenced by operator==().

◆ AfterPlacementOperator

bool clang::format::FormatStyle::SpaceBeforeParensCustom::AfterPlacementOperator

If true, put a space between operator new/delete and opening parenthesis.

true: false:
new (buf) T; vs. new(buf) T;
delete (buf) T; delete(buf) T;
const FunctionProtoType * T

Definition at line 4497 of file Format.h.

Referenced by clang::format::expandPresetsSpaceBeforeParens(), and operator==().

◆ AfterRequiresInClause

bool clang::format::FormatStyle::SpaceBeforeParensCustom::AfterRequiresInClause

If true, put space between requires keyword in a requires clause and opening parentheses, if there is one.

true: false:
template<typename T> vs. template<typename T>
requires (A<T> && B<T>) requires(A<T> && B<T>)
... ...

Definition at line 4506 of file Format.h.

Referenced by operator==().

◆ AfterRequiresInExpression

bool clang::format::FormatStyle::SpaceBeforeParensCustom::AfterRequiresInExpression

If true, put space between requires keyword in a requires expression and opening parentheses.

true: false:
template<typename T> vs. template<typename T>
concept C = requires (T t) { concept C = requires(T t) {
... ...
} }

Definition at line 4516 of file Format.h.

Referenced by operator==().

◆ BeforeNonEmptyParentheses

bool clang::format::FormatStyle::SpaceBeforeParensCustom::BeforeNonEmptyParentheses

If true, put a space before opening parentheses only if the parentheses are not empty.

true: false:
void f (int a); vs. void f();
f (a); f();

Definition at line 4524 of file Format.h.

Referenced by clang::format::expandPresetsSpaceBeforeParens(), and operator==().


The documentation for this struct was generated from the following file: