243 lines
6.2 KiB
YAML
243 lines
6.2 KiB
YAML
# Available style options are described in https://clang.llvm.org/docs/ClangFormatStyleOptions.html
|
|
#
|
|
# An easy way to create the .clang-format file is:
|
|
#
|
|
# clang-format -style=llvm -dump-config > .clang-format
|
|
#
|
|
---
|
|
Language: Cpp
|
|
BasedOnStyle: LLVM
|
|
AccessModifierOffset: -1
|
|
AlignAfterOpenBracket: Align
|
|
AlignArrayOfStructures: Right
|
|
AlignConsecutiveAssignments:
|
|
Enabled: true
|
|
AcrossEmptyLines: false
|
|
AcrossComments: false
|
|
AlignCompound: true
|
|
PadOperators: true
|
|
AlignConsecutiveBitFields:
|
|
Enabled: true
|
|
AcrossEmptyLines: false
|
|
AcrossComments: false
|
|
AlignCompound: true
|
|
PadOperators: true
|
|
AlignConsecutiveDeclarations:
|
|
Enabled: false
|
|
AcrossEmptyLines: false
|
|
AcrossComments: false
|
|
AlignCompound: false
|
|
PadOperators: false
|
|
AlignConsecutiveMacros:
|
|
Enabled: true
|
|
AcrossEmptyLines: false
|
|
AcrossComments: false
|
|
AlignCompound: false
|
|
PadOperators: false
|
|
AlignConsecutiveShortCaseStatements:
|
|
Enabled: false
|
|
AcrossEmptyLines: false
|
|
AcrossComments: false
|
|
AlignCaseColons: false
|
|
AlignEscapedNewlines: Left
|
|
AlignOperands: Align
|
|
AlignTrailingComments:
|
|
Kind: Always
|
|
OverEmptyLines: 1
|
|
AllowAllArgumentsOnNextLine: false
|
|
AllowAllParametersOfDeclarationOnNextLine: false
|
|
AllowShortBlocksOnASingleLine: Always
|
|
AllowShortCaseLabelsOnASingleLine: false
|
|
AllowShortEnumsOnASingleLine: false
|
|
AllowShortFunctionsOnASingleLine: None
|
|
AllowShortIfStatementsOnASingleLine: WithoutElse
|
|
AllowShortLambdasOnASingleLine: All
|
|
AllowShortLoopsOnASingleLine: true
|
|
AlwaysBreakAfterDefinitionReturnType: None
|
|
AlwaysBreakAfterReturnType: None
|
|
AlwaysBreakBeforeMultilineStrings: false
|
|
AlwaysBreakTemplateDeclarations: MultiLine
|
|
AttributeMacros:
|
|
- __capability
|
|
BinPackArguments: true
|
|
BinPackParameters: true
|
|
BitFieldColonSpacing: Both
|
|
BraceWrapping:
|
|
AfterCaseLabel: false
|
|
AfterClass: true
|
|
AfterControlStatement: Always
|
|
AfterEnum: true
|
|
AfterExternBlock: false
|
|
AfterFunction: true
|
|
AfterNamespace: true
|
|
AfterObjCDeclaration: true
|
|
AfterStruct: true
|
|
AfterUnion: false
|
|
BeforeCatch: true
|
|
BeforeElse: true
|
|
BeforeLambdaBody: false
|
|
BeforeWhile: false
|
|
IndentBraces: false
|
|
SplitEmptyFunction: true
|
|
SplitEmptyRecord: true
|
|
SplitEmptyNamespace: true
|
|
BreakAfterAttributes: Never
|
|
BreakAfterJavaFieldAnnotations: false
|
|
BreakArrays: false
|
|
BreakBeforeBinaryOperators: NonAssignment
|
|
BreakBeforeConceptDeclarations: Always
|
|
BreakBeforeBraces: Custom
|
|
BreakBeforeInlineASMColon: OnlyMultiline
|
|
BreakBeforeTernaryOperators: true
|
|
BreakConstructorInitializers: AfterColon
|
|
BreakInheritanceList: AfterColon
|
|
BreakStringLiterals: true
|
|
ColumnLimit: 0
|
|
CommentPragmas: "^ IWYU pragma:"
|
|
CompactNamespaces: false
|
|
ConstructorInitializerIndentWidth: 4
|
|
ContinuationIndentWidth: 4
|
|
Cpp11BracedListStyle: true
|
|
DerivePointerAlignment: false
|
|
DisableFormat: false
|
|
EmptyLineAfterAccessModifier: Never
|
|
EmptyLineBeforeAccessModifier: Always
|
|
ExperimentalAutoDetectBinPacking: false
|
|
FixNamespaceComments: true
|
|
ForEachMacros:
|
|
- foreach
|
|
- Q_FOREACH
|
|
- BOOST_FOREACH
|
|
IfMacros:
|
|
- KJ_IF_MAYBE
|
|
IncludeBlocks: Preserve
|
|
IncludeCategories:
|
|
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
|
|
Priority: 2
|
|
SortPriority: 0
|
|
CaseSensitive: false
|
|
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
|
|
Priority: 3
|
|
SortPriority: 0
|
|
CaseSensitive: false
|
|
- Regex: ".*"
|
|
Priority: 1
|
|
SortPriority: 0
|
|
CaseSensitive: false
|
|
IncludeIsMainRegex: "(Test)?$"
|
|
IncludeIsMainSourceRegex: ""
|
|
IndentAccessModifiers: false
|
|
IndentCaseBlocks: false
|
|
IndentCaseLabels: false
|
|
IndentExternBlock: NoIndent
|
|
IndentGotoLabels: true
|
|
IndentPPDirectives: None
|
|
IndentRequiresClause: true
|
|
IndentWidth: 4
|
|
IndentWrappedFunctionNames: false
|
|
InsertBraces: false
|
|
InsertNewlineAtEOF: true
|
|
InsertTrailingCommas: None
|
|
IntegerLiteralSeparator:
|
|
Binary: 0
|
|
BinaryMinDigits: 0
|
|
Decimal: 0
|
|
DecimalMinDigits: 0
|
|
Hex: 0
|
|
HexMinDigits: 0
|
|
JavaScriptQuotes: Leave
|
|
JavaScriptWrapImports: true
|
|
KeepEmptyLinesAtTheStartOfBlocks: false
|
|
KeepEmptyLinesAtEOF: true
|
|
LambdaBodyIndentation: Signature
|
|
LineEnding: DeriveLF
|
|
MacroBlockBegin: ""
|
|
MacroBlockEnd: ""
|
|
MaxEmptyLinesToKeep: 2
|
|
NamespaceIndentation: None
|
|
ObjCBinPackProtocolList: Auto
|
|
ObjCBlockIndentWidth: 2
|
|
ObjCBreakBeforeNestedBlockParam: true
|
|
ObjCSpaceAfterProperty: false
|
|
ObjCSpaceBeforeProtocolList: true
|
|
PackConstructorInitializers: BinPack
|
|
PenaltyBreakAssignment: 1000
|
|
PenaltyBreakBeforeFirstCallParameter: 19
|
|
PenaltyBreakComment: 300
|
|
PenaltyBreakFirstLessLess: 120
|
|
PenaltyBreakOpenParenthesis: 0
|
|
PenaltyBreakString: 1000
|
|
PenaltyBreakTemplateDeclaration: 10
|
|
PenaltyExcessCharacter: 1000000
|
|
PenaltyIndentedWhitespace: 0
|
|
PenaltyReturnTypeOnItsOwnLine: 1000
|
|
PointerAlignment: Right
|
|
PPIndentWidth: 4
|
|
QualifierAlignment: Leave
|
|
ReferenceAlignment: Pointer
|
|
ReflowComments: false
|
|
RemoveBracesLLVM: false
|
|
RemoveParentheses: Leave
|
|
RemoveSemicolon: false
|
|
RequiresClausePosition: OwnLine
|
|
RequiresExpressionIndentation: OuterScope
|
|
SeparateDefinitionBlocks: Leave
|
|
ShortNamespaceLines: 1
|
|
SortIncludes: Never
|
|
SortJavaStaticImport: Before
|
|
SortUsingDeclarations: LexicographicNumeric
|
|
SpaceAfterCStyleCast: false
|
|
SpaceAfterLogicalNot: false
|
|
SpaceAfterTemplateKeyword: true
|
|
SpaceAroundPointerQualifiers: Both
|
|
SpaceBeforeAssignmentOperators: true
|
|
SpaceBeforeCaseColon: false
|
|
SpaceBeforeCpp11BracedList: false
|
|
SpaceBeforeCtorInitializerColon: true
|
|
SpaceBeforeInheritanceColon: true
|
|
SpaceBeforeJsonColon: false
|
|
SpaceBeforeParens: ControlStatements
|
|
SpaceBeforeParensOptions:
|
|
AfterControlStatements: true
|
|
AfterForeachMacros: true
|
|
AfterFunctionDefinitionName: false
|
|
AfterFunctionDeclarationName: false
|
|
AfterIfMacros: true
|
|
AfterOverloadedOperator: false
|
|
AfterRequiresInClause: false
|
|
AfterRequiresInExpression: false
|
|
BeforeNonEmptyParentheses: false
|
|
SpaceBeforeRangeBasedForLoopColon: true
|
|
SpaceBeforeSquareBrackets: false
|
|
SpaceInEmptyBlock: false
|
|
SpacesBeforeTrailingComments: 1
|
|
SpacesInAngles: Never
|
|
SpacesInContainerLiterals: true
|
|
SpacesInLineCommentPrefix:
|
|
Minimum: 1
|
|
Maximum: -1
|
|
SpacesInParens: Never
|
|
SpacesInParensOptions:
|
|
InCStyleCasts: false
|
|
InConditionalStatements: false
|
|
InEmptyParentheses: false
|
|
Other: false
|
|
SpacesInSquareBrackets: false
|
|
Standard: Latest
|
|
StatementAttributeLikeMacros:
|
|
- Q_EMIT
|
|
StatementMacros:
|
|
- Q_UNUSED
|
|
- QT_REQUIRE_VERSION
|
|
TabWidth: 4
|
|
UseTab: Never
|
|
VerilogBreakBetweenInstancePorts: true
|
|
WhitespaceSensitiveMacros:
|
|
- BOOST_PP_STRINGIZE
|
|
- CF_SWIFT_NAME
|
|
- NS_SWIFT_NAME
|
|
- PP_STRINGIZE
|
|
- STRINGIZE
|
|
---
|
|
|