|
clang 24.0.0git
|
Separator format of integer literals of different bases. More...
#include "clang/Format/Format.h"
Public Member Functions | |
| bool | operator== (const IntegerLiteralSeparatorStyle &R) const |
| bool | operator!= (const IntegerLiteralSeparatorStyle &R) const |
Public Attributes | |
| int8_t | Binary |
| Format separators in binary literals. | |
| int8_t | BinaryMinDigitsInsert |
| Format separators in binary literals with a minimum number of digits. | |
| int8_t | BinaryMaxDigitsRemove |
| Remove separators in binary literals with a maximum number of digits. | |
| int8_t | Decimal |
| Format separators in decimal literals. | |
| int8_t | DecimalMinDigitsInsert |
| Format separators in decimal literals with a minimum number of digits. | |
| int8_t | DecimalMaxDigitsRemove |
| Remove separators in decimal literals with a maximum number of digits. | |
| int8_t | Hex |
| Format separators in hexadecimal literals. | |
| int8_t | HexMinDigitsInsert |
| Format separators in hexadecimal literals with a minimum number of digits. | |
| int8_t | HexMaxDigitsRemove |
| Remove separators in hexadecimal literals with a maximum number of digits. | |
Separator format of integer literals of different bases.
If negative, remove separators. If 0, leave the literal as is. If positive, insert separators between digits starting from the rightmost digit.
For example, the config below will leave separators in binary literals alone, insert separators in decimal literals to separate the digits into groups of 3, and remove separators in hexadecimal literals.
You can also specify a minimum number of digits (BinaryMinDigitsInsert, DecimalMinDigitsInsert, and HexMinDigitsInsert) the integer literal must have in order for the separators to be inserted, and a maximum number of digits (BinaryMaxDigitsRemove, DecimalMaxDigitsRemove, and HexMaxDigitsRemove) until the separators are removed. This divides the literals in 3 regions, always without separator (up until including xxxMaxDigitsRemove), maybe with, or without separators (up until excluding xxxMinDigitsInsert), and finally always with separators.
|
inline |
|
inline |
| int8_t clang::format::FormatStyle::IntegerLiteralSeparatorStyle::Binary |
| int8_t clang::format::FormatStyle::IntegerLiteralSeparatorStyle::BinaryMaxDigitsRemove |
Remove separators in binary literals with a maximum number of digits.
| int8_t clang::format::FormatStyle::IntegerLiteralSeparatorStyle::BinaryMinDigitsInsert |
| int8_t clang::format::FormatStyle::IntegerLiteralSeparatorStyle::Decimal |
| int8_t clang::format::FormatStyle::IntegerLiteralSeparatorStyle::DecimalMaxDigitsRemove |
Remove separators in decimal literals with a maximum number of digits.
| int8_t clang::format::FormatStyle::IntegerLiteralSeparatorStyle::DecimalMinDigitsInsert |
| int8_t clang::format::FormatStyle::IntegerLiteralSeparatorStyle::Hex |
| int8_t clang::format::FormatStyle::IntegerLiteralSeparatorStyle::HexMaxDigitsRemove |
Remove separators in hexadecimal literals with a maximum number of digits.
| int8_t clang::format::FormatStyle::IntegerLiteralSeparatorStyle::HexMinDigitsInsert |