123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242 |
- # 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: true
- 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
- ---
|