clang 24.0.0git
clang::format::FormatStyle::BinaryOperationBreakRule Struct Reference

A rule that specifies how to break a specific set of binary operators. More...

#include "clang/Format/Format.h"

Public Member Functions

bool operator== (const BinaryOperationBreakRule &R) const
bool operator!= (const BinaryOperationBreakRule &R) const

Public Attributes

std::vector< tok::TokenKindOperators
 The list of operators this rule applies to, e.g.
BreakBinaryOperationsStyle Style
 The break style for these operators (defaults to OnePerLine).
unsigned MinChainLength
 Minimum number of operands in a chain before the rule triggers.

Detailed Description

A rule that specifies how to break a specific set of binary operators.

Version
23

Definition at line 2565 of file Format.h.

Member Function Documentation

◆ operator!=()

bool clang::format::FormatStyle::BinaryOperationBreakRule::operator!= ( const BinaryOperationBreakRule & R) const
inline

Definition at line 2579 of file Format.h.

◆ operator==()

bool clang::format::FormatStyle::BinaryOperationBreakRule::operator== ( const BinaryOperationBreakRule & R) const
inline

Definition at line 2575 of file Format.h.

References MinChainLength, Operators, and Style.

Member Data Documentation

◆ MinChainLength

unsigned clang::format::FormatStyle::BinaryOperationBreakRule::MinChainLength

Minimum number of operands in a chain before the rule triggers.

For example, a && b && c is a chain of length 3. 0 means always break (when the line is too long).

Definition at line 2574 of file Format.h.

Referenced by operator==().

◆ Operators

std::vector<tok::TokenKind> clang::format::FormatStyle::BinaryOperationBreakRule::Operators

The list of operators this rule applies to, e.g.

&&, ||, |. Alternative spellings (e.g. and for &&) are accepted.

Definition at line 2568 of file Format.h.

Referenced by operator==().

◆ Style

BreakBinaryOperationsStyle clang::format::FormatStyle::BinaryOperationBreakRule::Style

The break style for these operators (defaults to OnePerLine).

Definition at line 2570 of file Format.h.

Referenced by operator==().


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