clang
9.0.0
|
The FormatStyle
is used to configure the formatting to follow specific guidelines.
More...
#include "clang/Format/Format.h"
Public Types | |
enum | BracketAlignmentStyle { BAS_Align, BAS_DontAlign, BAS_AlwaysBreak } |
Different styles for aligning after open brackets. More... | |
enum | EscapedNewlineAlignmentStyle { ENAS_DontAlign, ENAS_Left, ENAS_Right } |
Different styles for aligning escaped newlines. More... | |
Public Attributes | |
int | AccessModifierOffset |
The extra indent or outdent of access modifiers, e.g. public: . More... | |
BracketAlignmentStyle | AlignAfterOpenBracket |
If true , horizontally aligns arguments after an open bracket. More... | |
bool | AlignConsecutiveMacros |
If true , aligns consecutive C/C++ preprocessor macros. More... | |
bool | AlignConsecutiveAssignments |
If true , aligns consecutive assignments. More... | |
bool | AlignConsecutiveDeclarations |
If true , aligns consecutive declarations. More... | |
EscapedNewlineAlignmentStyle | AlignEscapedNewlines |
Options for aligning backslashes in escaped newlines. More... | |
bool | AlignOperands |
If true , horizontally align operands of binary and ternary expressions. More... | |
bool | AlignTrailingComments |
If true , aligns trailing comments. More... | |
bool | AllowAllArgumentsOnNextLine |
If a function call or braced initializer list doesn't fit on a line, allow putting all arguments onto the next line, even if BinPackArguments is false . More... | |
The FormatStyle
is used to configure the formatting to follow specific guidelines.
Different styles for aligning after open brackets.
Different styles for aligning escaped newlines.
int clang::format::FormatStyle::AccessModifierOffset |
The extra indent or outdent of access modifiers, e.g. public:
.
Definition at line 51 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), clang::format::getWebKitStyle(), and llvm::yaml::MappingTraits< FormatStyle >::mapping().
BracketAlignmentStyle clang::format::FormatStyle::AlignAfterOpenBracket |
If true
, horizontally aligns arguments after an open bracket.
This applies to round brackets (parentheses), angle brackets and square brackets.
Definition at line 80 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), clang::format::getWebKitStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and clang::format::CommaSeparatedList::precomputeFormattingInfos().
bool clang::format::FormatStyle::AlignConsecutiveAssignments |
If true
, aligns consecutive assignments.
This will align the assignment operators of consecutive lines. This will result in formattings like
Definition at line 104 of file Format.h.
Referenced by clang::format::getLLVMStyle(), and llvm::yaml::MappingTraits< FormatStyle >::mapping().
bool clang::format::FormatStyle::AlignConsecutiveDeclarations |
If true
, aligns consecutive declarations.
This will align the declaration names of consecutive lines. This will result in formattings like
Definition at line 115 of file Format.h.
Referenced by clang::format::getLLVMStyle(), and llvm::yaml::MappingTraits< FormatStyle >::mapping().
bool clang::format::FormatStyle::AlignConsecutiveMacros |
If true
, aligns consecutive C/C++ preprocessor macros.
This will align C/C++ preprocessor macros of consecutive lines. Will result in formattings like
Definition at line 93 of file Format.h.
Referenced by clang::format::AlignMacroSequence(), clang::format::getLLVMStyle(), and llvm::yaml::MappingTraits< FormatStyle >::mapping().
EscapedNewlineAlignmentStyle clang::format::FormatStyle::AlignEscapedNewlines |
Options for aligning backslashes in escaped newlines.
Definition at line 149 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), and llvm::yaml::MappingTraits< FormatStyle >::mapping().
bool clang::format::FormatStyle::AlignOperands |
If true
, horizontally align operands of binary and ternary expressions.
Specifically, this aligns operands of a single expression that needs to be split over multiple lines, e.g.:
Definition at line 160 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), clang::format::getWebKitStyle(), and llvm::yaml::MappingTraits< FormatStyle >::mapping().
bool clang::format::FormatStyle::AlignTrailingComments |
If true
, aligns trailing comments.
Definition at line 168 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), clang::format::getWebKitStyle(), and llvm::yaml::MappingTraits< FormatStyle >::mapping().
bool clang::format::FormatStyle::AllowAllArgumentsOnNextLine |
If a function call or braced initializer list doesn't fit on a line, allow putting all arguments onto the next line, even if BinPackArguments
is false
.
Definition at line 184 of file Format.h.
Referenced by clang::format::getLLVMStyle(), and llvm::yaml::MappingTraits< FormatStyle >::mapping().