clang
8.0.0
|
The FormatStyle
is used to configure the formatting to follow specific guidelines.
More...
#include "clang/Format/Format.h"
Classes | |
struct | BraceWrappingFlags |
Precise control over the wrapping of braces. More... | |
struct | FormatStyleSet |
struct | RawStringFormat |
See documentation of RawStringFormats . More... | |
Public Member Functions | |
bool | isCpp () const |
bool | operator== (const FormatStyle &R) const |
llvm::Optional< FormatStyle > | GetLanguageStyle (LanguageKind Language) const |
Static Public Member Functions | |
static FormatStyleSet | BuildStyleSetFromConfiguration (const FormatStyle &MainStyle, const std::vector< FormatStyle > &ConfigurationStyles) |
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 | 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 | AllowAllParametersOfDeclarationOnNextLine |
If the function declaration doesn't fit on a line, allow putting all parameters of a function declaration onto the next line even if BinPackParameters is false . More... | |
bool | AllowShortBlocksOnASingleLine |
Allows contracting simple braced statements to a single line. More... | |
bool | AllowShortCaseLabelsOnASingleLine |
If true , short case labels will be contracted to a single line. More... | |
ShortFunctionStyle | AllowShortFunctionsOnASingleLine |
Dependent on the value, int f() { return 0; } can be put on a single line. More... | |
bool | AllowShortIfStatementsOnASingleLine |
If true , if (a) return; can be put on a single line. More... | |
bool | AllowShortLoopsOnASingleLine |
If true , while (true) continue; can be put on a single line. More... | |
DefinitionReturnTypeBreakingStyle | AlwaysBreakAfterDefinitionReturnType |
The function definition return type breaking style to use. More... | |
ReturnTypeBreakingStyle | AlwaysBreakAfterReturnType |
The function declaration return type breaking style to use. More... | |
bool | AlwaysBreakBeforeMultilineStrings |
If true , always break before multiline string literals. More... | |
BreakTemplateDeclarationsStyle | AlwaysBreakTemplateDeclarations |
The template declaration breaking style to use. More... | |
bool | BinPackArguments |
If false , a function call's arguments will either be all on the same line or will have one line each. More... | |
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. More... | |
BinaryOperatorStyle | BreakBeforeBinaryOperators |
The way to wrap binary operators. More... | |
BraceBreakingStyle | BreakBeforeBraces |
The brace breaking style to use. More... | |
BraceWrappingFlags | BraceWrapping |
Control of individual brace wrapping cases. More... | |
bool | BreakBeforeTernaryOperators |
If true , ternary operators will be placed after line breaks. More... | |
BreakConstructorInitializersStyle | BreakConstructorInitializers |
The constructor initializers style to use. More... | |
bool | BreakAfterJavaFieldAnnotations |
Break after each annotation on a field in Java files. More... | |
bool | BreakStringLiterals |
Allow breaking string literals when formatting. More... | |
unsigned | ColumnLimit |
The column limit. More... | |
std::string | CommentPragmas |
A regular expression that describes comments with special meaning, which should not be split into lines or otherwise changed. More... | |
BreakInheritanceListStyle | BreakInheritanceList |
The inheritance list style to use. More... | |
bool | CompactNamespaces |
If true , consecutive namespace declarations will be on the same line. More... | |
bool | ConstructorInitializerAllOnOneLineOrOnePerLine |
If the constructor initializers don't fit on a line, put each initializer on its own line. More... | |
unsigned | ConstructorInitializerIndentWidth |
The number of characters to use for indentation of constructor initializer lists as well as inheritance lists. More... | |
unsigned | ContinuationIndentWidth |
Indent width for line continuations. More... | |
bool | Cpp11BracedListStyle |
If true , format braced lists as best suited for C++11 braced lists. More... | |
bool | DerivePointerAlignment |
If true , analyze the formatted file for the most common alignment of & and * . More... | |
bool | DisableFormat |
Disables formatting completely. More... | |
bool | ExperimentalAutoDetectBinPacking |
If true , clang-format detects whether function calls and definitions are formatted with one parameter per line. More... | |
bool | FixNamespaceComments |
If true , clang-format adds missing namespace end comments and fixes invalid existing ones. More... | |
std::vector< std::string > | ForEachMacros |
A vector of macros that should be interpreted as foreach loops instead of as function calls. More... | |
std::vector< std::string > | StatementMacros |
A vector of macros that should be interpreted as complete statements. More... | |
tooling::IncludeStyle | IncludeStyle |
bool | IndentCaseLabels |
Indent case labels one level from the switch statement. More... | |
PPDirectiveIndentStyle | IndentPPDirectives |
The preprocessor directive indenting style to use. More... | |
unsigned | IndentWidth |
The number of columns to use for indentation. More... | |
bool | IndentWrappedFunctionNames |
Indent if a function definition or declaration is wrapped after the type. More... | |
std::vector< std::string > | JavaImportGroups |
A vector of prefixes ordered by the desired groups for Java imports. More... | |
JavaScriptQuoteStyle | JavaScriptQuotes |
The JavaScriptQuoteStyle to use for JavaScript strings. More... | |
bool | JavaScriptWrapImports |
Whether to wrap JavaScript import/export statements. More... | |
bool | KeepEmptyLinesAtTheStartOfBlocks |
If true, the empty line at the start of blocks is kept. More... | |
LanguageKind | Language |
Language, this format style is targeted at. More... | |
std::string | MacroBlockBegin |
A regular expression matching macros that start a block. More... | |
std::string | MacroBlockEnd |
A regular expression matching macros that end a block. More... | |
unsigned | MaxEmptyLinesToKeep |
The maximum number of consecutive empty lines to keep. More... | |
NamespaceIndentationKind | NamespaceIndentation |
The indentation used for namespaces. More... | |
BinPackStyle | ObjCBinPackProtocolList |
Controls bin-packing Objective-C protocol conformance list items into as few lines as possible when they go over ColumnLimit . More... | |
unsigned | ObjCBlockIndentWidth |
The number of characters to use for indentation of ObjC blocks. More... | |
bool | ObjCSpaceAfterProperty |
bool | ObjCSpaceBeforeProtocolList |
Add a space in front of an Objective-C protocol list, i.e. More... | |
unsigned | PenaltyBreakAssignment |
The penalty for breaking around an assignment operator. More... | |
unsigned | PenaltyBreakBeforeFirstCallParameter |
The penalty for breaking a function call after call( . More... | |
unsigned | PenaltyBreakComment |
The penalty for each line break introduced inside a comment. More... | |
unsigned | PenaltyBreakFirstLessLess |
The penalty for breaking before the first << . More... | |
unsigned | PenaltyBreakString |
The penalty for each line break introduced inside a string literal. More... | |
unsigned | PenaltyBreakTemplateDeclaration |
The penalty for breaking after template declaration. More... | |
unsigned | PenaltyExcessCharacter |
The penalty for each character outside of the column limit. More... | |
unsigned | PenaltyReturnTypeOnItsOwnLine |
Penalty for putting the return type of a function onto its own line. More... | |
PointerAlignmentStyle | PointerAlignment |
Pointer and reference alignment style. More... | |
std::vector< RawStringFormat > | RawStringFormats |
Defines hints for detecting supported languages code blocks in raw strings. More... | |
bool | ReflowComments |
If true , clang-format will attempt to re-flow comments. More... | |
bool | SortIncludes |
If true , clang-format will sort #includes . More... | |
bool | SortUsingDeclarations |
If true , clang-format will sort using declarations. More... | |
bool | SpaceAfterCStyleCast |
If true , a space is inserted after C style casts. More... | |
bool | SpaceAfterTemplateKeyword |
If true , a space will be inserted after the 'template' keyword. More... | |
bool | SpaceBeforeAssignmentOperators |
If false , spaces will be removed before assignment operators. More... | |
bool | SpaceBeforeCpp11BracedList |
If true , a space will be inserted before a C++11 braced list used to initialize an object (after the preceding identifier or type). More... | |
bool | SpaceBeforeCtorInitializerColon |
If false , spaces will be removed before constructor initializer colon. More... | |
bool | SpaceBeforeInheritanceColon |
If false , spaces will be removed before inheritance colon. More... | |
SpaceBeforeParensOptions | SpaceBeforeParens |
Defines in which cases to put a space before opening parentheses. More... | |
bool | SpaceBeforeRangeBasedForLoopColon |
If false , spaces will be removed before range-based for loop colon. More... | |
bool | SpaceInEmptyParentheses |
If true , spaces may be inserted into () . More... | |
unsigned | SpacesBeforeTrailingComments |
The number of spaces before trailing line comments (// - comments). More... | |
bool | SpacesInAngles |
If true , spaces will be inserted after < and before > in template argument lists. More... | |
bool | SpacesInContainerLiterals |
If true , spaces are inserted inside container literals (e.g. More... | |
bool | SpacesInCStyleCastParentheses |
If true , spaces may be inserted into C style casts. More... | |
bool | SpacesInParentheses |
If true , spaces will be inserted after ( and before ) . More... | |
bool | SpacesInSquareBrackets |
If true , spaces will be inserted after [ and before ] . More... | |
LanguageStandard | Standard |
Format compatible with this standard, e.g. More... | |
unsigned | TabWidth |
The number of columns used for tab stops. More... | |
UseTabStyle | UseTab |
The way to use tab characters in the resulting file. More... | |
Friends | |
std::error_code | parseConfiguration (StringRef Text, FormatStyle *Style) |
Parse configuration from YAML-formatted text. More... | |
The FormatStyle
is used to configure the formatting to follow specific guidelines.
The style of breaking before or after binary operators.
Different ways to attach braces to their surrounding context.
Different styles for aligning after open brackets.
Different ways to break initializers.
Different ways to break inheritance list.
Different ways to break after the template declaration.
Different ways to break after the function definition return type.
This option is deprecated and is retained for backwards compatibility.
Different styles for aligning escaped newlines.
Quotation styles for JavaScript strings.
Does not affect template strings.
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.
Enumerator | |
---|---|
LK_None | Do not use. |
LK_Cpp | Should be used for C, C++. |
LK_Java | Should be used for Java. |
LK_JavaScript | Should be used for JavaScript. |
LK_ObjC | Should be used for Objective-C, Objective-C++. |
LK_Proto | Should be used for Protocol Buffers (https://developers.google.com/protocol-buffers/). |
LK_TableGen | Should be used for TableGen code. |
LK_TextProto | Should be used for Protocol Buffer messages in text format (https://developers.google.com/protocol-buffers/). |
Different ways to indent namespace contents.
Different ways to break after the function definition or declaration return type.
Different styles for merging short functions containing at most one statement.
Different ways to put a space before opening parentheses.
Different ways to use tab in formatting.
|
static |
llvm::Optional< FormatStyle > clang::format::FormatStyle::GetLanguageStyle | ( | FormatStyle::LanguageKind | Language | ) | const |
Definition at line 1068 of file Format.cpp.
References clang::format::Style.
Referenced by clang::format::RawStringFormatStyleManager::RawStringFormatStyleManager().
|
inline |
Definition at line 1238 of file Format.h.
Referenced by clang::format::formatReplacements(), clang::format::getFormattingLangOpts(), and clang::format::FormatToken::isCppStructuredBinding().
|
inline |
Definition at line 1715 of file Format.h.
References AccessModifierOffset, AlignAfterOpenBracket, AlignConsecutiveAssignments, AlignConsecutiveDeclarations, AlignEscapedNewlines, AlignOperands, AlignTrailingComments, AllowAllParametersOfDeclarationOnNextLine, AllowShortBlocksOnASingleLine, AllowShortCaseLabelsOnASingleLine, AllowShortFunctionsOnASingleLine, AllowShortIfStatementsOnASingleLine, AllowShortLoopsOnASingleLine, AlwaysBreakAfterReturnType, AlwaysBreakBeforeMultilineStrings, AlwaysBreakTemplateDeclarations, BinPackArguments, BinPackParameters, BreakAfterJavaFieldAnnotations, BreakBeforeBinaryOperators, BreakBeforeBraces, BreakBeforeTernaryOperators, BreakConstructorInitializers, BreakInheritanceList, BreakStringLiterals, ColumnLimit, CommentPragmas, CompactNamespaces, ConstructorInitializerAllOnOneLineOrOnePerLine, ConstructorInitializerIndentWidth, ContinuationIndentWidth, Cpp11BracedListStyle, DerivePointerAlignment, DisableFormat, ExperimentalAutoDetectBinPacking, FixNamespaceComments, ForEachMacros, clang::tooling::IncludeStyle::IncludeBlocks, clang::tooling::IncludeStyle::IncludeCategories, IncludeStyle, IndentCaseLabels, IndentPPDirectives, IndentWidth, IndentWrappedFunctionNames, JavaImportGroups, JavaScriptQuotes, JavaScriptWrapImports, KeepEmptyLinesAtTheStartOfBlocks, Language, MacroBlockBegin, MacroBlockEnd, MaxEmptyLinesToKeep, NamespaceIndentation, ObjCBinPackProtocolList, ObjCBlockIndentWidth, ObjCSpaceAfterProperty, ObjCSpaceBeforeProtocolList, PenaltyBreakAssignment, PenaltyBreakBeforeFirstCallParameter, PenaltyBreakComment, PenaltyBreakFirstLessLess, PenaltyBreakString, PenaltyBreakTemplateDeclaration, PenaltyExcessCharacter, PenaltyReturnTypeOnItsOwnLine, PointerAlignment, RawStringFormats, SpaceAfterCStyleCast, SpaceAfterTemplateKeyword, SpaceBeforeAssignmentOperators, SpaceBeforeCpp11BracedList, SpaceBeforeCtorInitializerColon, SpaceBeforeInheritanceColon, SpaceBeforeParens, SpaceBeforeRangeBasedForLoopColon, SpaceInEmptyParentheses, SpacesBeforeTrailingComments, SpacesInAngles, SpacesInContainerLiterals, SpacesInCStyleCastParentheses, SpacesInParentheses, SpacesInSquareBrackets, Standard, StatementMacros, TabWidth, and UseTab.
|
friend |
Parse configuration from YAML-formatted text.
Style->Language is used to get the base style, if the BasedOnStyle
option is present.
The FormatStyleSet of Style is reset.
When BasedOnStyle
is not present, options not present in the YAML document, are retained in Style
.
Definition at line 975 of file Format.cpp.
int clang::format::FormatStyle::AccessModifierOffset |
The extra indent or outdent of access modifiers, e.g. public:
.
Definition at line 52 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), clang::format::getWebKitStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
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 81 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), clang::format::getWebKitStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), operator==(), 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 92 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
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 103 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
EscapedNewlineAlignmentStyle clang::format::FormatStyle::AlignEscapedNewlines |
Options for aligning backslashes in escaped newlines.
Definition at line 137 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
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 148 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), clang::format::getWebKitStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
bool clang::format::FormatStyle::AlignTrailingComments |
If true
, aligns trailing comments.
Definition at line 156 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), clang::format::getWebKitStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
bool clang::format::FormatStyle::AllowAllParametersOfDeclarationOnNextLine |
If the function declaration doesn't fit on a line, allow putting all parameters of a function declaration onto the next line even if BinPackParameters
is false
.
Definition at line 173 of file Format.h.
Referenced by clang::format::getChromiumStyle(), clang::format::getLLVMStyle(), clang::format::getMozillaStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
bool clang::format::FormatStyle::AllowShortBlocksOnASingleLine |
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 178 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
bool clang::format::FormatStyle::AllowShortCaseLabelsOnASingleLine |
If true
, short case labels will be contracted to a single line.
Definition at line 191 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
ShortFunctionStyle clang::format::FormatStyle::AllowShortFunctionsOnASingleLine |
Dependent on the value, int f() { return 0; }
can be put on a single line.
Definition at line 243 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==().
bool clang::format::FormatStyle::AllowShortIfStatementsOnASingleLine |
If true
, if (a) return;
can be put on a single line.
Definition at line 246 of file Format.h.
Referenced by clang::format::getChromiumStyle(), clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
bool clang::format::FormatStyle::AllowShortLoopsOnASingleLine |
If true
, while (true) continue;
can be put on a single line.
Definition at line 250 of file Format.h.
Referenced by clang::format::getChromiumStyle(), clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
DefinitionReturnTypeBreakingStyle clang::format::FormatStyle::AlwaysBreakAfterDefinitionReturnType |
The function definition return type breaking style to use.
This option is deprecated and is retained for backwards compatibility.
Definition at line 337 of file Format.h.
Referenced by clang::format::getGNUStyle(), clang::format::getLLVMStyle(), clang::format::getMozillaStyle(), and llvm::yaml::MappingTraits< FormatStyle >::mapping().
ReturnTypeBreakingStyle clang::format::FormatStyle::AlwaysBreakAfterReturnType |
The function declaration return type breaking style to use.
Definition at line 340 of file Format.h.
Referenced by clang::format::getGNUStyle(), clang::format::getLLVMStyle(), clang::format::getMozillaStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
bool clang::format::FormatStyle::AlwaysBreakBeforeMultilineStrings |
If true
, always break before multiline string literals.
This flag is mean to make cases where there are multiple multiline strings in a file look more consistent. Thus, it will only take effect if wrapping the string at that point leads to it being indented ContinuationIndentWidth
spaces from the start of the line.
Definition at line 354 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
BreakTemplateDeclarationsStyle clang::format::FormatStyle::AlwaysBreakTemplateDeclarations |
The template declaration breaking style to use.
Definition at line 393 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), clang::format::getMozillaStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
bool clang::format::FormatStyle::BinPackArguments |
If false
, a function call's arguments will either be all on the same line or will have one line each.
Definition at line 411 of file Format.h.
Referenced by clang::format::getLLVMStyle(), clang::format::getMozillaStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), operator==(), and clang::format::CommaSeparatedList::precomputeFormattingInfos().
bool clang::format::FormatStyle::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.
Definition at line 425 of file Format.h.
Referenced by clang::format::getChromiumStyle(), clang::format::getLLVMStyle(), clang::format::getMozillaStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
BraceWrappingFlags clang::format::FormatStyle::BraceWrapping |
Control of individual brace wrapping cases.
If BreakBeforeBraces
is set to BS_Custom
, use this to specify how each individual brace case should be handled. Otherwise, this is ignored.
Definition at line 822 of file Format.h.
Referenced by clang::format::CompoundStatementIndenter::CompoundStatementIndenter(), clang::format::expandPresets(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and clang::format::ShouldBreakBeforeBrace().
bool clang::format::FormatStyle::BreakAfterJavaFieldAnnotations |
Break after each annotation on a field in Java files.
Definition at line 874 of file Format.h.
Referenced by clang::format::getChromiumStyle(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
BinaryOperatorStyle clang::format::FormatStyle::BreakBeforeBinaryOperators |
The way to wrap binary operators.
Definition at line 479 of file Format.h.
Referenced by clang::format::getGNUStyle(), clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), clang::format::getWebKitStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
BraceBreakingStyle clang::format::FormatStyle::BreakBeforeBraces |
The brace breaking style to use.
Definition at line 614 of file Format.h.
Referenced by clang::format::expandPresets(), clang::format::getGNUStyle(), clang::format::getLLVMStyle(), clang::format::getMozillaStyle(), clang::format::getWebKitStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
bool clang::format::FormatStyle::BreakBeforeTernaryOperators |
If true
, ternary operators will be placed after line breaks.
Definition at line 836 of file Format.h.
Referenced by clang::format::getGNUStyle(), clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
BreakConstructorInitializersStyle clang::format::FormatStyle::BreakConstructorInitializers |
The constructor initializers style to use.
Definition at line 865 of file Format.h.
Referenced by clang::format::getLLVMStyle(), clang::format::getMozillaStyle(), clang::format::getWebKitStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
BreakInheritanceListStyle clang::format::FormatStyle::BreakInheritanceList |
The inheritance list style to use.
Definition at line 925 of file Format.h.
Referenced by clang::format::getLLVMStyle(), clang::format::getMozillaStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
bool clang::format::FormatStyle::BreakStringLiterals |
Allow breaking string literals when formatting.
Definition at line 877 of file Format.h.
Referenced by clang::format::ContinuationIndenter::getColumnLimit(), clang::format::getEnclosingFunctionName(), clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
unsigned clang::format::FormatStyle::ColumnLimit |
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 884 of file Format.h.
Referenced by clang::tooling::applyAtomicChanges(), clang::format::BreakableBlockComment::BreakableBlockComment(), clang::format::TokenAnnotator::calculateFormattingInformation(), clang::format::CommaSeparatedList::formatAfterToken(), clang::format::getChromiumStyle(), clang::format::ContinuationIndenter::getColumnLimit(), clang::format::getEnclosingFunctionName(), clang::format::getGNUStyle(), clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), clang::format::getWebKitStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), operator==(), clang::format::CommaSeparatedList::precomputeFormattingInfos(), and clang::format::RawStringFormatStyleManager::RawStringFormatStyleManager().
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 893 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
bool clang::format::FormatStyle::CompactNamespaces |
If true
, consecutive namespace declarations will be on the same line.
If false
, each namespace is declared on a new line.
If it does not fit on a single line, the overflowing namespaces get wrapped:
Definition at line 948 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
bool clang::format::FormatStyle::ConstructorInitializerAllOnOneLineOrOnePerLine |
If the constructor initializers don't fit on a line, put each initializer on its own line.
Definition at line 966 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
unsigned clang::format::FormatStyle::ConstructorInitializerIndentWidth |
The number of characters to use for indentation of constructor initializer lists as well as inheritance lists.
Definition at line 970 of file Format.h.
Referenced by clang::format::getLLVMStyle(), clang::format::getMozillaStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
unsigned clang::format::FormatStyle::ContinuationIndentWidth |
Indent width for line continuations.
Definition at line 980 of file Format.h.
Referenced by clang::format::getChromiumStyle(), clang::format::BreakableBlockComment::getContentIndent(), clang::format::getLLVMStyle(), clang::format::getMozillaStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
bool clang::format::FormatStyle::Cpp11BracedListStyle |
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 1002 of file Format.h.
Referenced by clang::format::getGNUStyle(), clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), clang::format::getMozillaStyle(), clang::format::getWebKitStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), clang::format::FormatToken::opensBlockOrBlockTypeList(), operator==(), and clang::format::CommaSeparatedList::precomputeFormattingInfos().
bool clang::format::FormatStyle::DerivePointerAlignment |
If true
, analyze the formatted file for the most common alignment of &
and *
.
Pointer and reference alignment styles are going to be updated according to the preferences found in the file. PointerAlignment
is then used only as fallback.
Definition at line 1009 of file Format.h.
Referenced by clang::format::getChromiumStyle(), clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
bool clang::format::FormatStyle::DisableFormat |
Disables formatting completely.
Definition at line 1012 of file Format.h.
Referenced by clang::format::getLLVMStyle(), clang::format::getNoStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
bool clang::format::FormatStyle::ExperimentalAutoDetectBinPacking |
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 1024 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
bool clang::format::FormatStyle::FixNamespaceComments |
If true
, clang-format adds missing namespace end comments and fixes invalid existing ones.
Definition at line 1034 of file Format.h.
Referenced by clang::format::getGNUStyle(), clang::format::getLLVMStyle(), clang::format::getMozillaStyle(), clang::format::getWebKitStyle(), 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:
In the .clang-format configuration file, this can be configured like:
For example: BOOST_FOREACH.
Definition at line 1051 of file Format.h.
Referenced by clang::format::FormatTokenLexer::FormatTokenLexer(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
tooling::IncludeStyle clang::format::FormatStyle::IncludeStyle |
Definition at line 1063 of file Format.h.
Referenced by clang::format::formatReplacements(), clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), operator==(), and clang::format::sortCppIncludes().
bool clang::format::FormatStyle::IndentCaseLabels |
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 1079 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), clang::format::getMozillaStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
PPDirectiveIndentStyle clang::format::FormatStyle::IndentPPDirectives |
The preprocessor directive indenting style to use.
Definition at line 1104 of file Format.h.
Referenced by clang::format::ContinuationIndenter::getInitialState(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
unsigned clang::format::FormatStyle::IndentWidth |
The number of columns to use for indentation.
Definition at line 1117 of file Format.h.
Referenced by clang::format::getChromiumStyle(), clang::format::getLLVMStyle(), clang::format::getWebKitStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
bool clang::format::FormatStyle::IndentWrappedFunctionNames |
Indent if a function definition or declaration is wrapped after the type.
Definition at line 1130 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), operator==(), and clang::format::shouldIndentWrappedSelectorName().
std::vector<std::string> clang::format::FormatStyle::JavaImportGroups |
A vector of prefixes ordered by the desired groups for Java imports.
Each group is seperated by a newline. Static imports will also follow the same grouping convention above all non-static imports. One group's prefix can be a subset of another - the longest prefix is always matched. Within a group, the imports are ordered lexicographically.
In the .clang-format configuration file, this can be configured like in the following yaml example. This will result in imports being formatted as in the Java example below.
Definition at line 1161 of file Format.h.
Referenced by clang::format::findJavaImportGroup(), clang::format::getChromiumStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
JavaScriptQuoteStyle clang::format::FormatStyle::JavaScriptQuotes |
The JavaScriptQuoteStyle to use for JavaScript strings.
Definition at line 1187 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
bool clang::format::FormatStyle::JavaScriptWrapImports |
Whether to wrap JavaScript import/export statements.
Definition at line 1201 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
bool clang::format::FormatStyle::KeepEmptyLinesAtTheStartOfBlocks |
If true, the empty line at the start of blocks is kept.
Definition at line 1211 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
LanguageKind clang::format::FormatStyle::Language |
Language, this format style is targeted at.
Definition at line 1241 of file Format.h.
Referenced by clang::format::FormatStyle::FormatStyleSet::Add(), clang::format::BreakableBlockComment::BreakableBlockComment(), clang::format::BreakableLineCommentSection::BreakableLineCommentSection(), clang::format::cleanup(), clang::format::getCommentSplit(), clang::format::BreakableBlockComment::getContentIndent(), clang::format::getEnclosingFunctionName(), clang::format::getGoogleStyle(), clang::format::ContinuationIndenter::getInitialState(), clang::format::getLineCommentIndentPrefix(), clang::format::getLLVMStyle(), clang::format::getStyle(), clang::format::isAllmanBrace(), clang::format::FormatTokenLexer::lex(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), clang::format::FormatToken::opensBlockOrBlockTypeList(), clang::format::opensProtoMessageField(), operator==(), clang::format::parseConfiguration(), clang::format::RawStringFormatStyleManager::RawStringFormatStyleManager(), clang::format::sortIncludes(), and clang::format::TokenAnalyzer::TokenAnalyzer().
std::string clang::format::FormatStyle::MacroBlockBegin |
A regular expression matching macros that start a block.
Definition at line 1269 of file Format.h.
Referenced by clang::format::FormatTokenLexer::FormatTokenLexer(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
std::string clang::format::FormatStyle::MacroBlockEnd |
A regular expression matching macros that end a block.
Definition at line 1272 of file Format.h.
Referenced by clang::format::FormatTokenLexer::FormatTokenLexer(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
unsigned clang::format::FormatStyle::MaxEmptyLinesToKeep |
The maximum number of consecutive empty lines to keep.
Definition at line 1285 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), clang::format::isAllmanBrace(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
NamespaceIndentationKind clang::format::FormatStyle::NamespaceIndentation |
The indentation used for namespaces.
Definition at line 1322 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), clang::format::getWebKitStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
BinPackStyle clang::format::FormatStyle::ObjCBinPackProtocolList |
Controls bin-packing Objective-C protocol conformance list items into as few lines as possible when they go over ColumnLimit
.
If Auto
(the default), delegates to the value in BinPackParameters
. If that is true
, bin-packs Objective-C protocol conformance list items into as few lines as possible whenever they go over ColumnLimit
.
If Always
, always bin-packs Objective-C protocol conformance list items into as few lines as possible whenever they go over ColumnLimit
.
If Never
, lays out Objective-C protocol conformance list items onto individual lines whenever they go over ColumnLimit
.
Definition at line 1354 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
unsigned clang::format::FormatStyle::ObjCBlockIndentWidth |
The number of characters to use for indentation of ObjC blocks.
Definition at line 1364 of file Format.h.
Referenced by clang::format::getLLVMStyle(), clang::format::getWebKitStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
bool clang::format::FormatStyle::ObjCSpaceAfterProperty |
Definition at line 1368 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==().
bool clang::format::FormatStyle::ObjCSpaceBeforeProtocolList |
Add a space in front of an Objective-C protocol list, i.e.
use Foo <Protocol>
instead of Foo<Protocol>
.
Definition at line 1372 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), clang::format::getMozillaStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
unsigned clang::format::FormatStyle::PenaltyBreakAssignment |
The penalty for breaking around an assignment operator.
Definition at line 1375 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
unsigned clang::format::FormatStyle::PenaltyBreakBeforeFirstCallParameter |
The penalty for breaking a function call after call(
.
Definition at line 1378 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
unsigned clang::format::FormatStyle::PenaltyBreakComment |
The penalty for each line break introduced inside a comment.
Definition at line 1381 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
unsigned clang::format::FormatStyle::PenaltyBreakFirstLessLess |
The penalty for breaking before the first <<
.
Definition at line 1384 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
unsigned clang::format::FormatStyle::PenaltyBreakString |
The penalty for each line break introduced inside a string literal.
Definition at line 1387 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
unsigned clang::format::FormatStyle::PenaltyBreakTemplateDeclaration |
The penalty for breaking after template declaration.
Definition at line 1390 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
unsigned clang::format::FormatStyle::PenaltyExcessCharacter |
The penalty for each character outside of the column limit.
Definition at line 1393 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
unsigned clang::format::FormatStyle::PenaltyReturnTypeOnItsOwnLine |
Penalty for putting the return type of a function onto its own line.
Definition at line 1397 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), clang::format::getMozillaStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
PointerAlignmentStyle clang::format::FormatStyle::PointerAlignment |
Pointer and reference alignment style.
Definition at line 1419 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==().
std::vector<RawStringFormat> clang::format::FormatStyle::RawStringFormats |
Defines hints for detecting supported languages code blocks in raw strings.
A raw string with a matching delimiter or a matching enclosing function name will be reformatted assuming the specified language based on the style for that language defined in the .clang-format file. If no style has been defined in the .clang-format file for the specific language, a predefined style given by 'BasedOnStyle' is used. If 'BasedOnStyle' is not found, the formatting is based on llvm style. A matching delimiter takes precedence over a matching enclosing function name for determining the language of the raw string contents.
If a canonical delimiter is specified, occurrences of other delimiters for the same language will be updated to the canonical if possible.
There should be at most one specification per language and each delimiter and enclosing function should not occur in multiple specifications.
To configure this in the .clang-format file, use:
Definition at line 1478 of file Format.h.
Referenced by clang::format::getCanonicalRawStringDelimiter(), clang::format::getGoogleStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), operator==(), and clang::format::RawStringFormatStyleManager::RawStringFormatStyleManager().
bool clang::format::FormatStyle::ReflowComments |
If true
, clang-format will attempt to re-flow comments.
Definition at line 1492 of file Format.h.
Referenced by clang::format::getEnclosingFunctionName(), clang::format::getLLVMStyle(), and llvm::yaml::MappingTraits< FormatStyle >::mapping().
bool clang::format::FormatStyle::SortIncludes |
If true
, clang-format will sort #includes
.
Definition at line 1500 of file Format.h.
Referenced by clang::format::getChromiumStyle(), clang::format::getLLVMStyle(), clang::format::getNoStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and clang::format::sortIncludes().
bool clang::format::FormatStyle::SortUsingDeclarations |
If true
, clang-format will sort using declarations.
The order of using declarations is defined as follows: Split the strings by "::" and discard any initial empty strings. The last element of each list is a non-namespace name; all others are namespace names. Sort the lists of names lexicographically, where the sort order of individual names is that all non-namespace names come before all namespace names, and within those groups, names are in case-insensitive lexicographic order.
Definition at line 1516 of file Format.h.
Referenced by clang::format::getLLVMStyle(), clang::format::getNoStyle(), and llvm::yaml::MappingTraits< FormatStyle >::mapping().
bool clang::format::FormatStyle::SpaceAfterCStyleCast |
If true
, a space is inserted after C style casts.
Definition at line 1523 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
bool clang::format::FormatStyle::SpaceAfterTemplateKeyword |
If true
, a space will be inserted after the 'template' keyword.
Definition at line 1530 of file Format.h.
Referenced by clang::format::getLLVMStyle(), clang::format::getMozillaStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
bool clang::format::FormatStyle::SpaceBeforeAssignmentOperators |
If false
, spaces will be removed before assignment operators.
Definition at line 1538 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
bool clang::format::FormatStyle::SpaceBeforeCpp11BracedList |
If true
, a space will be inserted before a C++11 braced list used to initialize an object (after the preceding identifier or type).
Definition at line 1549 of file Format.h.
Referenced by clang::format::getLLVMStyle(), clang::format::getWebKitStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
bool clang::format::FormatStyle::SpaceBeforeCtorInitializerColon |
If false
, spaces will be removed before constructor initializer colon.
Definition at line 1557 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
bool clang::format::FormatStyle::SpaceBeforeInheritanceColon |
If false
, spaces will be removed before inheritance colon.
Definition at line 1564 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
SpaceBeforeParensOptions clang::format::FormatStyle::SpaceBeforeParens |
Defines in which cases to put a space before opening parentheses.
Definition at line 1602 of file Format.h.
Referenced by clang::format::getGNUStyle(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
bool clang::format::FormatStyle::SpaceBeforeRangeBasedForLoopColon |
If false
, spaces will be removed before range-based for loop colon.
Definition at line 1610 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
bool clang::format::FormatStyle::SpaceInEmptyParentheses |
If true
, spaces may be inserted into ()
.
Definition at line 1622 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
unsigned clang::format::FormatStyle::SpacesBeforeTrailingComments |
The number of spaces before trailing line comments (//
- comments).
This does not affect trailing block comments (/*
- comments) as those commonly have different usage patterns and a number of special cases.
Definition at line 1638 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
bool clang::format::FormatStyle::SpacesInAngles |
If true
, spaces will be inserted after <
and before >
in template argument lists.
Definition at line 1647 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
bool clang::format::FormatStyle::SpacesInContainerLiterals |
If true
, spaces are inserted inside container literals (e.g.
ObjC and Javascript array and dict literals).
Definition at line 1656 of file Format.h.
Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
bool clang::format::FormatStyle::SpacesInCStyleCastParentheses |
If true
, spaces may be inserted into C style casts.
Definition at line 1663 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
bool clang::format::FormatStyle::SpacesInParentheses |
If true
, spaces will be inserted after (
and before )
.
Definition at line 1670 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
bool clang::format::FormatStyle::SpacesInSquareBrackets |
If true
, spaces will be inserted after [
and before ]
.
Lambdas or unspecified size array declarations will not be affected.
Definition at line 1679 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
LanguageStandard clang::format::FormatStyle::Standard |
Format compatible with this standard, e.g.
use A<A<int> >
instead of A<A<int>>
for LS_Cpp03
.
Definition at line 1694 of file Format.h.
Referenced by clang::format::getFormattingLangOpts(), clang::format::getGNUStyle(), clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
std::vector<std::string> clang::format::FormatStyle::StatementMacros |
A vector of macros that should be interpreted as complete statements.
Typical macros are expressions, and require a semi-colon to be added; sometimes this is not the case, and this allows to make clang-format aware of such cases.
For example: Q_UNUSED
Definition at line 1061 of file Format.h.
Referenced by clang::format::FormatTokenLexer::FormatTokenLexer(), clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
unsigned clang::format::FormatStyle::TabWidth |
The number of columns used for tab stops.
Definition at line 1697 of file Format.h.
Referenced by clang::format::BreakableBlockComment::BreakableBlockComment(), clang::format::BreakableLineCommentSection::BreakableLineCommentSection(), clang::format::getLLVMStyle(), clang::format::BreakableBlockComment::getRangeLength(), clang::format::BreakableLineCommentSection::getRangeLength(), clang::format::BreakableStringLiteral::getRemainingLength(), clang::format::BreakableStringLiteral::getSplit(), clang::format::BreakableComment::getSplit(), clang::format::FormatTokenLexer::lex(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().
UseTabStyle clang::format::FormatStyle::UseTab |
The way to use tab characters in the resulting file.
Definition at line 1713 of file Format.h.
Referenced by clang::format::getLLVMStyle(), llvm::yaml::MappingTraits< FormatStyle >::mapping(), and operator==().