clang  16.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"

Collaboration diagram for clang::format::FormatStyle::SpaceBeforeParensCustom:
Collaboration graph
[legend]

Public Member Functions

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

Public Attributes

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

Detailed Description

Precise control over the spacing before parentheses.

Definition at line 3612 of file Format.h.

Constructor & Destructor Documentation

◆ SpaceBeforeParensCustom()

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

Definition at line 3684 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 betwee control statement keywords (for/if/while...) and opening parentheses.

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

Definition at line 3619 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 3626 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 3633 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 3640 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 3647 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 3655 of file Format.h.

Referenced by 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 3664 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 3674 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 3682 of file Format.h.

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


The documentation for this struct was generated from the following file:
clang::format::FormatStyle::SpaceBeforeParens
SpaceBeforeParensStyle SpaceBeforeParens
Defines in which cases to put a space before opening parentheses.
Definition: Format.h:3602
clang::format::FormatStyle::SpaceBeforeParensCustom::AfterControlStatements
bool AfterControlStatements
If true, put space betwee control statement keywords (for/if/while...) and opening parentheses.
Definition: Format.h:3619
AttributeLangSupport::C
@ C
Definition: SemaDeclAttr.cpp:56
clang::format::FormatStyle::SpaceBeforeParensCustom::AfterFunctionDefinitionName
bool AfterFunctionDefinitionName
If true, put a space between function definition name and opening parentheses.
Definition: Format.h:3640
clang::XRayInstrKind::Custom
constexpr XRayInstrMask Custom
Definition: XRayInstr.h:41
clang::format::FormatStyle::SpaceBeforeParensOptions
SpaceBeforeParensCustom SpaceBeforeParensOptions
Control of individual space before parentheses.
Definition: Format.h:3718