int AccessModifierOffset;
/// Different styles for aligning after open brackets.
- enum BracketAlignmentStyle {
+ enum BracketAlignmentStyle : unsigned char {
/// Align parameters on the open bracket, e.g.:
/// \code
/// someLongFunction(argument1,
bool AlignConsecutiveDeclarations;
/// Different styles for aligning escaped newlines.
- enum EscapedNewlineAlignmentStyle {
+ enum EscapedNewlineAlignmentStyle : unsigned char {
/// Don't align escaped newlines.
/// \code
/// #define A \
EscapedNewlineAlignmentStyle AlignEscapedNewlines;
/// Different styles for aligning operands.
- enum OperandAlignmentStyle {
+ enum OperandAlignmentStyle : unsigned char {
/// Do not align operands of binary and ternary expressions.
/// The wrapped lines are indented ``ContinuationIndentWidth`` spaces from
/// the start of the line.
/// Different styles for merging short blocks containing at most one
/// statement.
- enum ShortBlockStyle {
+ enum ShortBlockStyle : unsigned char {
/// Never merge blocks into a single line.
/// \code
/// while (true) {
/// Different styles for merging short functions containing at most one
/// statement.
- enum ShortFunctionStyle {
+ enum ShortFunctionStyle : unsigned char {
/// Never merge functions into a single line.
SFS_None,
/// Only merge functions defined inside a class. Same as "inline",
ShortFunctionStyle AllowShortFunctionsOnASingleLine;
/// Different styles for handling short if lines
- enum ShortIfStyle {
+ enum ShortIfStyle : unsigned char {
/// Never put short ifs on the same line.
/// \code
/// if (a)
/// Different styles for merging short lambdas containing at most one
/// statement.
- enum ShortLambdaStyle {
+ enum ShortLambdaStyle : unsigned char {
/// Never merge lambdas into a single line.
SLS_None,
/// Only merge empty lambdas.
/// Different ways to break after the function definition return type.
/// This option is **deprecated** and is retained for backwards compatibility.
- enum DefinitionReturnTypeBreakingStyle {
+ enum DefinitionReturnTypeBreakingStyle : unsigned char {
/// Break after return type automatically.
/// ``PenaltyReturnTypeOnItsOwnLine`` is taken into account.
DRTBS_None,
/// Different ways to break after the function definition or
/// declaration return type.
- enum ReturnTypeBreakingStyle {
+ enum ReturnTypeBreakingStyle : unsigned char {
/// Break after return type automatically.
/// ``PenaltyReturnTypeOnItsOwnLine`` is taken into account.
/// \code
bool AlwaysBreakBeforeMultilineStrings;
/// Different ways to break after the template declaration.
- enum BreakTemplateDeclarationsStyle {
+ enum BreakTemplateDeclarationsStyle : unsigned char {
/// Do not force break before declaration.
/// ``PenaltyBreakTemplateDeclaration`` is taken into account.
/// \code
bool BinPackArguments;
/// The style of inserting trailing commas into container literals.
- enum TrailingCommaStyle {
+ enum TrailingCommaStyle : unsigned char {
/// Do not insert trailing commas.
TCS_None,
/// Insert trailing commas in container literals that were wrapped over
/// The style of wrapping parameters on the same line (bin-packed) or
/// on one line each.
- enum BinPackStyle {
+ enum BinPackStyle : unsigned char {
/// Automatically determine parameter bin-packing behavior.
BPS_Auto,
/// Always bin-pack parameters.
};
/// The style of breaking before or after binary operators.
- enum BinaryOperatorStyle {
+ enum BinaryOperatorStyle : unsigned char {
/// Break after operators.
/// \code
/// LooooooooooongType loooooooooooooooooooooongVariable =
BinaryOperatorStyle BreakBeforeBinaryOperators;
/// Different ways to attach braces to their surrounding context.
- enum BraceBreakingStyle {
+ enum BraceBreakingStyle : unsigned char {
/// Always attach braces to surrounding context.
/// \code
/// namespace N {
BraceBreakingStyle BreakBeforeBraces;
/// Different ways to wrap braces after control statements.
- enum BraceWrappingAfterControlStatementStyle {
+ enum BraceWrappingAfterControlStatementStyle : unsigned char {
/// Never wrap braces after a control statement.
/// \code
/// if (foo()) {
bool BreakBeforeTernaryOperators;
/// Different ways to break initializers.
- enum BreakConstructorInitializersStyle {
+ enum BreakConstructorInitializersStyle : unsigned char {
/// Break constructor initializers before the colon and after the commas.
/// \code
/// Constructor()
std::string CommentPragmas;
/// Different ways to break inheritance list.
- enum BreakInheritanceListStyle {
+ enum BreakInheritanceListStyle : unsigned char {
/// Break inheritance list before the colon and after the commas.
/// \code
/// class Foo
bool IndentPragmas;
/// Options for indenting preprocessor directives.
- enum PPDirectiveIndentStyle {
+ enum PPDirectiveIndentStyle : unsigned char {
/// Does not indent any directives.
/// \code
/// #if FOO
PPDirectiveIndentStyle IndentPPDirectives;
/// Indents extern blocks
- enum IndentExternBlockStyle {
+ enum IndentExternBlockStyle : unsigned char {
/// Backwards compatible with AfterExternBlock's indenting.
/// \code
/// IndentExternBlock: AfterExternBlock
/// Quotation styles for JavaScript strings. Does not affect template
/// strings.
- enum JavaScriptQuoteStyle {
+ enum JavaScriptQuoteStyle : unsigned char {
/// Leave string quotes as they are.
/// \code{.js}
/// string1 = "foo";
/// When stored in a configuration file, specifies the language, that the
/// configuration targets. When passed to the ``reformat()`` function, enables
/// syntax features specific to the language.
- enum LanguageKind {
+ enum LanguageKind : unsigned char {
/// Do not use.
LK_None,
/// Should be used for C, C++.
unsigned MaxEmptyLinesToKeep;
/// Different ways to indent namespace contents.
- enum NamespaceIndentationKind {
+ enum NamespaceIndentationKind : unsigned char {
/// Don't indent in namespaces.
/// \code
/// namespace out {
unsigned PenaltyIndentedWhitespace;
/// The ``&`` and ``*`` alignment style.
- enum PointerAlignmentStyle {
+ enum PointerAlignmentStyle : unsigned char {
/// Align pointer to the left.
/// \code
/// int* a;
bool SortIncludes;
/// Position for Java Static imports.
- enum SortJavaStaticImportOptions {
+ enum SortJavaStaticImportOptions : unsigned char {
/// Static imports are placed before non-static imports.
/// \code{.java}
/// import static org.example.function1;
bool SpaceAfterTemplateKeyword;
/// Different ways to put a space before opening parentheses.
- enum SpaceAroundPointerQualifiersStyle {
+ enum SpaceAroundPointerQualifiersStyle : unsigned char {
/// Don't ensure spaces around pointer qualifiers and use PointerAlignment
/// instead.
/// \code
bool SpaceBeforeInheritanceColon;
/// Different ways to put a space before opening parentheses.
- enum SpaceBeforeParensOptions {
+ enum SpaceBeforeParensOptions : unsigned char {
/// Never put a space before opening parentheses.
/// \code
/// void f() {
bool SpaceBeforeSquareBrackets;
/// Styles for adding spacing around ``:`` in bitfield definitions.
- enum BitFieldColonSpacingStyle {
+ enum BitFieldColonSpacingStyle : unsigned char {
/// Add one space on each side of the ``:``
/// \code
/// unsigned bf : 2;
///
/// The correct way to spell a specific language version is e.g. ``c++11``.
/// The historical aliases ``Cpp03`` and ``Cpp11`` are deprecated.
- enum LanguageStandard {
+ enum LanguageStandard : unsigned char {
/// Parse and format as C++03.
/// ``Cpp03`` is a deprecated alias for ``c++03``
LS_Cpp03, // c++03
unsigned TabWidth;
/// Different ways to use tab in formatting.
- enum UseTabStyle {
+ enum UseTabStyle : unsigned char {
/// Never use tab.
UT_Never,
/// Use tabs only for indentation.