clang API Documentation
The FormatStyle
is used to configure the formatting to follow specific guidelines.
More...
#include <Format.h>
Public Types | |
enum | LanguageKind { LK_None, LK_Cpp, LK_Java, LK_JavaScript, LK_Proto } |
Supported languages. 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. More... | |
enum | PointerAlignmentStyle { PAS_Left, PAS_Right, PAS_Middle } |
The & and * alignment style. More... | |
enum | LanguageStandard { LS_Cpp03, LS_Cpp11, LS_Auto } |
Supported language standards. More... | |
enum | NamespaceIndentationKind { NI_None, NI_Inner, NI_All } |
Different ways to indent namespace contents. More... | |
enum | ShortFunctionStyle { SFS_None, SFS_Inline, SFS_All } |
Different styles for merging short functions containing at most one statement. More... | |
enum | UseTabStyle { UT_Never, UT_ForIndentation, UT_Always } |
Different ways to use tab in formatting. More... | |
enum | BinaryOperatorStyle { BOS_None, BOS_NonAssignment, BOS_All } |
The style of breaking before or after binary operators. More... | |
enum | BraceBreakingStyle { BS_Attach, BS_Linux, BS_Stroustrup, BS_Allman, BS_GNU } |
Different ways to attach braces to their surrounding context. More... | |
enum | SpaceBeforeParensOptions { SBPO_Never, SBPO_ControlStatements, SBPO_Always } |
Different ways to put a space before opening parentheses. More... | |
Public Member Functions | |
bool | operator== (const FormatStyle &R) const |
Public Attributes | |
LanguageKind | Language |
Language, this format style is targeted at. | |
unsigned | ColumnLimit |
The column limit. | |
unsigned | MaxEmptyLinesToKeep |
The maximum number of consecutive empty lines to keep. | |
bool | KeepEmptyLinesAtTheStartOfBlocks |
If true, empty lines at the start of blocks are kept. | |
unsigned | PenaltyBreakComment |
The penalty for each line break introduced inside a comment. | |
unsigned | PenaltyBreakString |
The penalty for each line break introduced inside a string literal. | |
unsigned | PenaltyExcessCharacter |
The penalty for each character outside of the column limit. | |
unsigned | PenaltyBreakFirstLessLess |
The penalty for breaking before the first << . | |
unsigned | PenaltyBreakBeforeFirstCallParameter |
The penalty for breaking a function call after "call(". | |
PointerAlignmentStyle | PointerAlignment |
Pointer and reference alignment style. | |
bool | DerivePointerAlignment |
If true , analyze the formatted file for the most common alignment of & and *. PointerAlignment is then used only as fallback. | |
int | AccessModifierOffset |
The extra indent or outdent of access modifiers, e.g. public: . | |
LanguageStandard | Standard |
Format compatible with this standard, e.g. use A<A<int> > instead of A<A<int>> for LS_Cpp03. | |
bool | IndentCaseLabels |
Indent case labels one level from the switch statement. | |
bool | IndentWrappedFunctionNames |
Indent if a function definition or declaration is wrapped after the type. | |
NamespaceIndentationKind | NamespaceIndentation |
The indentation used for namespaces. | |
comments as those commonly have different usage patterns and a number of special cases *unsigned | SpacesBeforeTrailingComments |
The number of spaces before trailing line comments (// - comments). | |
bool | BinPackParameters |
If false , a function declaration's or function definition's parameters will either all be on the same line or will have one line each. | |
bool | BinPackArguments |
If false , a function call's arguments will either be all on the same line or will have one line each. | |
bool | ExperimentalAutoDetectBinPacking |
If true , clang-format detects whether function calls and definitions are formatted with one parameter per line. | |
bool | AllowAllParametersOfDeclarationOnNextLine |
Allow putting all parameters of a function declaration onto the next line even if BinPackParameters is false . | |
unsigned | PenaltyReturnTypeOnItsOwnLine |
Penalty for putting the return type of a function onto its own line. | |
bool | ConstructorInitializerAllOnOneLineOrOnePerLine |
If the constructor initializers don't fit on a line, put each initializer on its own line. | |
bool | BreakConstructorInitializersBeforeComma |
Always break constructor initializers before commas and align the commas with the colon. | |
bool | AllowShortBlocksOnASingleLine |
Allows contracting simple braced statements to a single line. | |
bool | AllowShortIfStatementsOnASingleLine |
If true , if (a) return; can be put on a single line. | |
bool | AllowShortLoopsOnASingleLine |
If true , while (true) continue; can be put on a single line. | |
bool | AllowShortCaseLabelsOnASingleLine |
If true , short case labels will be contracted to a single line. | |
ShortFunctionStyle | AllowShortFunctionsOnASingleLine |
Dependent on the value, int f() { return 0; } can be put on a single line. | |
bool | ObjCSpaceAfterProperty |
bool | ObjCSpaceBeforeProtocolList |
Add a space in front of an Objective-C protocol list, i.e. use Foo <Protocol> instead of Foo<Protocol> . | |
bool | AlignTrailingComments |
If true , aligns trailing comments. | |
bool | AlignEscapedNewlinesLeft |
If true , aligns escaped newlines as far left as possible. Otherwise puts them into the right-most column. | |
unsigned | IndentWidth |
The number of columns to use for indentation. | |
unsigned | TabWidth |
The number of columns used for tab stops. | |
unsigned | ConstructorInitializerIndentWidth |
The number of characters to use for indentation of constructor initializer lists. | |
unsigned | ObjCBlockIndentWidth |
The number of characters to use for indentation of ObjC blocks. | |
bool | AlwaysBreakAfterDefinitionReturnType |
If true , always break after function definition return types. | |
bool | AlwaysBreakTemplateDeclarations |
If true , always break after the template<...> of a template declaration. | |
bool | AlwaysBreakBeforeMultilineStrings |
If true , always break before multiline string literals. | |
UseTabStyle | UseTab |
The way to use tab characters in the resulting file. | |
BinaryOperatorStyle | BreakBeforeBinaryOperators |
The way to wrap binary operators. | |
bool | BreakBeforeTernaryOperators |
If true , ternary operators will be placed after line breaks. | |
BraceBreakingStyle | BreakBeforeBraces |
The brace breaking style to use. | |
bool | Cpp11BracedListStyle |
If true , format braced lists as best suited for C++11 braced lists. | |
bool | SpacesInParentheses |
If true , spaces will be inserted after '(' and before ')'. | |
bool | SpacesInAngles |
If true , spaces will be inserted after '<' and before '>' in template argument lists. | |
bool | SpacesInSquareBrackets |
If true , spaces will be inserted after '[' and before ']'. | |
bool | SpaceInEmptyParentheses |
If true , spaces may be inserted into '()'. | |
bool | SpacesInContainerLiterals |
If true , spaces are inserted inside container literals (e.g. ObjC and Javascript array and dict literals). | |
bool | SpacesInCStyleCastParentheses |
If true , spaces may be inserted into C style casts. | |
bool | SpaceAfterCStyleCast |
If true , a space may be inserted after C style casts. | |
SpaceBeforeParensOptions | SpaceBeforeParens |
Defines in which cases to put a space before opening parentheses. | |
bool | SpaceBeforeAssignmentOperators |
If false , spaces will be removed before assignment operators. | |
unsigned | ContinuationIndentWidth |
Indent width for line continuations. | |
std::string | CommentPragmas |
A regular expression that describes comments with special meaning, which should not be split into lines or otherwise changed. | |
bool | DisableFormat |
Disables formatting at all. | |
std::vector< std::string > | ForEachMacros |
A vector of macros that should be interpreted as foreach loops instead of as function calls. |
The FormatStyle
is used to configure the formatting to follow specific guidelines.
Different ways to attach braces to their surrounding context.
Supported languages. 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.
LK_None |
Do not use. |
LK_Cpp |
Should be used for C, C++, ObjectiveC, ObjectiveC++. |
LK_Java |
Should be used for Java. |
LK_JavaScript |
Should be used for JavaScript. |
LK_Proto |
Should be used for Protocol Buffers (https://developers.google.com/protocol-buffers/). |
Different ways to put a space before opening parentheses.
bool clang::format::FormatStyle::operator== | ( | const FormatStyle & | R | ) | const [inline] |
Definition at line 395 of file Format.h.
References AccessModifierOffset, AlignEscapedNewlinesLeft, AlignTrailingComments, AllowAllParametersOfDeclarationOnNextLine, AllowShortBlocksOnASingleLine, AllowShortFunctionsOnASingleLine, AllowShortIfStatementsOnASingleLine, AllowShortLoopsOnASingleLine, AlwaysBreakAfterDefinitionReturnType, AlwaysBreakBeforeMultilineStrings, AlwaysBreakTemplateDeclarations, BinPackArguments, BinPackParameters, BreakBeforeBinaryOperators, BreakBeforeBraces, BreakBeforeTernaryOperators, BreakConstructorInitializersBeforeComma, ColumnLimit, CommentPragmas, ConstructorInitializerAllOnOneLineOrOnePerLine, ConstructorInitializerIndentWidth, ContinuationIndentWidth, Cpp11BracedListStyle, DerivePointerAlignment, ExperimentalAutoDetectBinPacking, ForEachMacros, IndentCaseLabels, IndentWidth, IndentWrappedFunctionNames, KeepEmptyLinesAtTheStartOfBlocks, Language, MaxEmptyLinesToKeep, NamespaceIndentation, ObjCBlockIndentWidth, ObjCSpaceAfterProperty, ObjCSpaceBeforeProtocolList, PenaltyBreakComment, PenaltyBreakFirstLessLess, PenaltyBreakString, PenaltyExcessCharacter, PenaltyReturnTypeOnItsOwnLine, PointerAlignment, SpaceAfterCStyleCast, SpaceBeforeAssignmentOperators, SpaceBeforeParens, SpaceInEmptyParentheses, SpacesBeforeTrailingComments, SpacesInAngles, SpacesInContainerLiterals, SpacesInCStyleCastParentheses, SpacesInParentheses, SpacesInSquareBrackets, Standard, TabWidth, and UseTab.
The extra indent or outdent of access modifiers, e.g. public:
.
Definition at line 109 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), clang::format::getWebKitStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
If true
, aligns escaped newlines as far left as possible. Otherwise puts them into the right-most column.
Definition at line 236 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
If true
, aligns trailing comments.
Definition at line 232 of file Format.h.
Referenced by clang::format::getLLVMStyle(), clang::format::getWebKitStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
Allow putting all parameters of a function declaration onto the next line even if BinPackParameters
is false
.
Definition at line 178 of file Format.h.
Referenced by clang::format::getChromiumStyle(), clang::format::getLLVMStyle(), clang::format::getMozillaStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
Allows contracting simple braced statements to a single line.
E.g., this allows if (a) { return; }
to be put on a single line.
Definition at line 195 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
If true
, short case labels will be contracted to a single line.
Definition at line 206 of file Format.h.
Referenced by clang::format::getLLVMStyle(), and llvm::yaml::MappingTraits< FormatStyle >::mapping().
Dependent on the value, int f() { return 0; }
can be put on a single line.
Definition at line 221 of file Format.h.
Referenced by clang::format::getChromiumStyle(), clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), clang::format::ContinuationIndenter::mustBreak(), and operator==().
If true
, if (a) return;
can be put on a single line.
Definition at line 199 of file Format.h.
Referenced by clang::format::getChromiumStyle(), clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
If true
, while (true) continue;
can be put on a single line.
Definition at line 203 of file Format.h.
Referenced by clang::format::getChromiumStyle(), clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
If true
, always break after function definition return types.
More truthfully called 'break before the identifier following the type in a function definition'. PenaltyReturnTypeOnItsOwnLine becomes irrelevant.
Definition at line 256 of file Format.h.
Referenced by clang::format::ContinuationIndenter::canBreak(), clang::format::getGNUStyle(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
If true
, always break before multiline string literals.
Definition at line 263 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), clang::format::ContinuationIndenter::mustBreak(), and operator==().
If true
, always break after the template<...>
of a template declaration.
Definition at line 260 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
If false
, a function call's arguments will either be all on the same line or will have one line each.
Definition at line 162 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
If false
, a function declaration's or function definition's parameters will either all be on the same line or will have one line each.
Definition at line 158 of file Format.h.
Referenced by clang::format::getChromiumStyle(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), operator==(), and clang::format::CommaSeparatedList::precomputeFormattingInfos().
The way to wrap binary operators.
Definition at line 290 of file Format.h.
Referenced by clang::format::getGNUStyle(), clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), clang::format::getWebKitStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), clang::format::ContinuationIndenter::mustBreak(), and operator==().
The brace breaking style to use.
Definition at line 313 of file Format.h.
Referenced by clang::format::CompoundStatementIndenter::CompoundStatementIndenter(), clang::format::getGNUStyle(), clang::format::getLLVMStyle(), clang::format::getWebKitStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), operator==(), and clang::format::ShouldBreakBeforeBrace().
If true
, ternary operators will be placed after line breaks.
Definition at line 293 of file Format.h.
Referenced by clang::format::getGNUStyle(), clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), clang::format::ContinuationIndenter::mustBreak(), and operator==().
Always break constructor initializers before commas and align the commas with the colon.
Definition at line 190 of file Format.h.
Referenced by clang::format::getLLVMStyle(), clang::format::getWebKitStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), clang::format::ContinuationIndenter::mustBreak(), operator==(), and clang::format::startsNextParameter().
The column limit.
A column limit of 0
means that there is no column limit. In this case, clang-format will respect the input's line breaking decisions within statements unless they contradict other rules.
Definition at line 68 of file Format.h.
Referenced by clang::format::CommaSeparatedList::formatAfterToken(), clang::format::ContinuationIndenter::getColumnLimit(), clang::format::getGNUStyle(), clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), clang::format::getWebKitStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), clang::format::ContinuationIndenter::mustBreak(), operator==(), and clang::format::CommaSeparatedList::precomputeFormattingInfos().
std::string clang::format::FormatStyle::CommentPragmas |
A regular expression that describes comments with special meaning, which should not be split into lines or otherwise changed.
Definition at line 378 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
If the constructor initializers don't fit on a line, put each initializer on its own line.
Definition at line 186 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), clang::format::getMozillaStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
The number of characters to use for indentation of constructor initializer lists.
Definition at line 246 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
Indent width for line continuations.
Definition at line 374 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
If true
, format braced lists as best suited for C++11 braced lists.
Important differences:
Fundamentally, C++11 braced lists are formatted exactly like function calls would be formatted in their place. If the braced list follows a name (e.g. a type or variable name), clang-format formats as if the {}
were the parentheses of a function call with that name. If there is no name, a zero-length name is assumed.
Definition at line 328 of file Format.h.
Referenced by clang::format::getGNUStyle(), clang::format::getLLVMStyle(), clang::format::getMozillaStyle(), clang::format::getWebKitStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), clang::format::FormatToken::opensBlockTypeList(), operator==(), and clang::format::CommaSeparatedList::precomputeFormattingInfos().
If true
, analyze the formatted file for the most common alignment of & and *. PointerAlignment
is then used only as fallback.
Definition at line 106 of file Format.h.
Referenced by clang::format::getChromiumStyle(), clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), clang::format::getMozillaStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
Disables formatting at all.
Definition at line 381 of file Format.h.
Referenced by clang::format::getLLVMStyle(), clang::format::getNoStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and clang::format::reformat().
If true
, clang-format detects whether function calls and definitions are formatted with one parameter per line.
Each call can be bin-packed, one-per-line or inconclusive. If it is inconclusive, e.g. completely on one line, but a decision needs to be made, clang-format analyzes whether there are other bin-packed cases in the input file and act accordingly.
NOTE: This is an experimental flag, that might go away or be renamed. Do not use this in config files, etc. Use at your own risk.
Definition at line 174 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
std::vector<std::string> clang::format::FormatStyle::ForEachMacros |
A vector of macros that should be interpreted as foreach loops instead of as function calls.
These are expected to be macros of the form:
FOREACH(<variable-declaration>, ...) <loop-body>
For example: BOOST_FOREACH.
Definition at line 393 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
Indent case labels one level from the switch statement.
When false
, use the same indentation level as for the switch statement. Switch statement body is always indented one level more than case labels.
Definition at line 130 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), clang::format::getMozillaStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
The number of columns to use for indentation.
Definition at line 239 of file Format.h.
Referenced by clang::format::getLLVMStyle(), clang::format::getWebKitStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
Indent if a function definition or declaration is wrapped after the type.
Definition at line 134 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
If true, empty lines at the start of blocks are kept.
Definition at line 74 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
Language, this format style is targeted at.
Definition at line 61 of file Format.h.
Referenced by clang::format::ContinuationIndenter::canBreak(), llvm::yaml::DocumentListTraits< std::vector< FormatStyle > >::element(), clang::format::getFormattingLangOpts(), clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), clang::format::getPredefinedStyle(), clang::format::getStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), operator==(), and clang::format::parseConfiguration().
The maximum number of consecutive empty lines to keep.
Definition at line 71 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
The indentation used for namespaces.
Definition at line 147 of file Format.h.
Referenced by clang::format::getLLVMStyle(), clang::format::getWebKitStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
The number of characters to use for indentation of ObjC blocks.
Definition at line 249 of file Format.h.
Referenced by clang::format::getLLVMStyle(), clang::format::getWebKitStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
Definition at line 225 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), clang::format::getMozillaStyle(), clang::format::getWebKitStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
Add a space in front of an Objective-C protocol list, i.e. use Foo <Protocol>
instead of Foo<Protocol>
.
Definition at line 229 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), clang::format::getMozillaStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
The penalty for breaking a function call after "call(".
Definition at line 89 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), and llvm::yaml::MappingTraits< FormatStyle >::mapping().
The penalty for each line break introduced inside a comment.
Definition at line 77 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
The penalty for breaking before the first <<
.
Definition at line 86 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
The penalty for each line break introduced inside a string literal.
Definition at line 80 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
The penalty for each character outside of the column limit.
Definition at line 83 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
Penalty for putting the return type of a function onto its own line.
Definition at line 182 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), clang::format::getMozillaStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
Pointer and reference alignment style.
Definition at line 102 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), clang::format::getMozillaStyle(), clang::format::getWebKitStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
If true
, a space may be inserted after C style casts.
Definition at line 351 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
If false
, spaces will be removed before assignment operators.
Definition at line 371 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
Defines in which cases to put a space before opening parentheses.
Definition at line 368 of file Format.h.
Referenced by clang::format::getGNUStyle(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
If true
, spaces may be inserted into '()'.
Definition at line 341 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
comments as those commonly have different usage patterns and a number of special cases* unsigned clang::format::FormatStyle::SpacesBeforeTrailingComments |
The number of spaces before trailing line comments (//
- comments).
This does not affect trailing block comments (/*
Definition at line 154 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
If true
, spaces will be inserted after '<' and before '>' in template argument lists.
Definition at line 335 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
If true
, spaces are inserted inside container literals (e.g. ObjC and Javascript array and dict literals).
Definition at line 345 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
If true
, spaces may be inserted into C style casts.
Definition at line 348 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
If true
, spaces will be inserted after '(' and before ')'.
Definition at line 331 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
If true
, spaces will be inserted after '[' and before ']'.
Definition at line 338 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
Format compatible with this standard, e.g. use A<A<int> >
instead of A<A<int>>
for LS_Cpp03.
Definition at line 124 of file Format.h.
Referenced by clang::format::getFormattingLangOpts(), clang::format::getGNUStyle(), clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), clang::format::getMozillaStyle(), clang::format::getWebKitStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
The number of columns used for tab stops.
Definition at line 242 of file Format.h.
Referenced by clang::format::BreakableSingleLineToken::getLineLengthAfterSplit(), clang::format::BreakableBlockComment::getLineLengthAfterSplit(), clang::format::getLLVMStyle(), clang::format::BreakableStringLiteral::getSplit(), clang::format::BreakableLineComment::getSplit(), clang::format::BreakableBlockComment::getSplit(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
The way to use tab characters in the resulting file.
Definition at line 277 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().