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

Alignment options. More...

#include "clang/Format/Format.h"

Public Member Functions

bool operator== (const ShortCaseStatementsAlignmentStyle &R) const
 

Public Attributes

bool Enabled
 Whether aligning is enabled.
 
bool AcrossEmptyLines
 Whether to align across empty lines.
 
bool AcrossComments
 Whether to align across comments.
 
bool AlignCaseColons
 Whether aligned case labels are aligned on the colon, or on the , or on the tokens after the colon.
 

Detailed Description

Alignment options.

Definition at line 322 of file Format.h.

Member Function Documentation

◆ operator==()

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

Definition at line 396 of file Format.h.

References AcrossComments, AcrossEmptyLines, AlignCaseColons, and Enabled.

Member Data Documentation

◆ AcrossComments

bool clang::format::FormatStyle::ShortCaseStatementsAlignmentStyle::AcrossComments

Whether to align across comments.

true:
switch (level) {
case log::info: return "info:";
case log::warning: return "warning:";
/* A comment. */
default: return "";
}
false:
switch (level) {
case log::info: return "info:";
case log::warning: return "warning:";
/* A comment. */
default: return "";
}

Definition at line 377 of file Format.h.

Referenced by operator==().

◆ AcrossEmptyLines

bool clang::format::FormatStyle::ShortCaseStatementsAlignmentStyle::AcrossEmptyLines

Whether to align across empty lines.

true:
switch (level) {
case log::info: return "info:";
case log::warning: return "warning:";
default: return "";
}
false:
switch (level) {
case log::info: return "info:";
case log::warning: return "warning:";
default: return "";
}

Definition at line 358 of file Format.h.

Referenced by operator==().

◆ AlignCaseColons

bool clang::format::FormatStyle::ShortCaseStatementsAlignmentStyle::AlignCaseColons

Whether aligned case labels are aligned on the colon, or on the , or on the tokens after the colon.

true:
switch (level) {
case log::info : return "info:";
case log::warning: return "warning:";
default : return "";
}
false:
switch (level) {
case log::info: return "info:";
case log::warning: return "warning:";
default: return "";
}

Definition at line 395 of file Format.h.

Referenced by operator==().

◆ Enabled

bool clang::format::FormatStyle::ShortCaseStatementsAlignmentStyle::Enabled

Whether aligning is enabled.

true:
switch (level) {
case log::info: return "info:";
case log::warning: return "warning:";
default: return "";
}
false:
switch (level) {
case log::info: return "info:";
case log::warning: return "warning:";
default: return "";
}

Definition at line 339 of file Format.h.

Referenced by operator==().


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