Skip to content

Commit

Permalink
Update Clang-Format config for Clang 17
Browse files Browse the repository at this point in the history
  • Loading branch information
NiLuJe committed Sep 22, 2023
1 parent a7469bd commit f05f4b8
Showing 1 changed file with 23 additions and 5 deletions.
28 changes: 23 additions & 5 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ AlignConsecutiveDeclarations: AcrossComments
AlignConsecutiveMacros: AcrossComments
AlignEscapedNewlines: Right
AlignOperands: Align
AlignTrailingComments: true
AlignTrailingComments:
Kind: Always
OverEmptyLines: 0
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Empty
Expand Down Expand Up @@ -48,10 +50,14 @@ BraceWrapping:
SplitEmptyFunction: true
SplitEmptyRecord: false
SplitEmptyNamespace: true
BracedInitializerIndentWidth: 4
BreakAfterAttributes: Never
BreakAfterJavaFieldAnnotations: false
BreakArrays: false
BreakBeforeBinaryOperators: None
BreakBeforeInheritanceComma: false
BreakBeforeConceptDeclarations: Allowed
BreakBeforeInlineASMColon: OnlyMultiline
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: AfterColon
Expand Down Expand Up @@ -99,14 +105,21 @@ IndentWidth: 8
IndentWrappedFunctionNames: true
# NOTE: New as of Clang 15, may still misbehave
InsertBraces: true
InsertNewlineAtEOF: true
InsertTrailingCommas: None
# C++ only, which essentially means nope, because C headers ;).
#IntegerLiteralSeparator:
# Binary: 8
#JavaImportGroups: ['com.example', 'com', 'org']
JavaScriptQuotes: Double
JavaScriptWrapImports: true
KeepEmptyLinesAtEOF: false
KeepEmptyLinesAtTheStartOfBlocks: false
LambdaBodyIndentation: Signature
LineEnding: DeriveLF
MacroBlockBegin: ''
MacroBlockEnd: ''
#Macros:
MaxEmptyLinesToKeep: 1
NamespaceIndentation: All
#NamespaceMacros: ['TESTSUITE']
Expand Down Expand Up @@ -136,13 +149,17 @@ PointerAlignment: Left
ReferenceAlignment: Pointer
ReflowComments: false
RemoveBracesLLVM: false
# NOTE: MultipleParentheses might be fun, but may misbehave
RemoveParentheses: Leave
RemoveSemicolon: true
RequiresClausePosition: WithPreceding
RequiresExpressionIndentation: OuterScope
# NOTE: Nice in theory, but there can be exceptions in practice ;).
SeparateDefinitionBlocks: Leave
ShortNamespaceLines: 1
SortIncludes: CaseSensitive
SortJavaStaticImport: Before
SortUsingDeclarations: true
SortUsingDeclarations: LexicographicNumeric
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
Expand All @@ -152,11 +169,11 @@ SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeJsonColon: false
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 4
SpacesInAngles: Never
SpacesInCStyleCastParentheses: false
Expand All @@ -165,17 +182,18 @@ SpacesInContainerLiterals: true
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
SpacesInParentheses: false
SpacesInParens: Never
SpacesInSquareBrackets: false
Standard: Latest
StatementAttributeLikeMacros: ['emit']
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 8
#TypeNames: []
TypenameMacros: ['STACK_OF', 'LIST_ENTRY']
UseCRLF: false
UseTab: ForContinuationAndIndentation
VerilogBreakBetweenInstancePorts: true
#WhitespaceSensitiveMacros: ['STRINGIZE', 'PP_STRINGIZE']
...

0 comments on commit f05f4b8

Please sign in to comment.