Update .clang-format to clang-10.

This commit is contained in:
tastytea 2020-07-05 05:54:15 +02:00
parent a2d762ff20
commit 4c2db38cff
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07

View File

@ -1,6 +1,6 @@
# -*- mode: yaml -*-
# Written for clang-format 9.
# https://releases.llvm.org/9.0.0/tools/clang/docs/ClangFormatStyleOptions.html
# Written for clang-format 10.
# https://releases.llvm.org/10.0.0/tools/clang/docs/ClangFormatStyleOptions.html
---
DisableFormat: false
Language: Cpp
@ -9,28 +9,28 @@ AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
# AlignConsecutiveMacros: false
AlignConsecutiveMacros: false
AlignEscapedNewlines: DontAlign
AlignOperands: true
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false # Never
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: false # Never
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: Inline
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
BinPackArguments: true # TODO: Not sure what I prefer.
BinPackArguments: false # TODO: Not sure what I prefer.
BinPackParameters: true # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
BraceWrapping: # If BreakBeforeBraces is set to Custom.
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: true # Always
AfterControlStatement: Always
AfterEnum: true
AfterFunction: true
AfterNamespace: true
@ -57,9 +57,8 @@ ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
# DeriveLineEnding: true
DeriveLineEnding: true
DerivePointerAlignment: false
# ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- FOREACH
@ -69,7 +68,7 @@ ForEachMacros:
IncludeBlocks: Preserve
# IndentCaseBlocks: false
IndentCaseLabels: false
# IndentGotoLabels: false
IndentGotoLabels: false
IndentPPDirectives: AfterHash
IndentWidth: 4
IndentWrappedFunctionNames: false
@ -99,13 +98,13 @@ SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
# SpaceBeforeSquareBrackets: false
# SpaceInEmptyBlock: false
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
# SpacesBeforeTrailingComments: 1 # FIXME: I want clang-format to ignore it.
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
# SpacesInConditionalStatement: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false