#=========================== begin_copyright_notice ============================
#
# Copyright (C) 2020-2024 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
#============================ end_copyright_notice =============================

# Clang-format settings.
# '// clang-format off' is used for disabling auto-formatting in some places.
# '// clang-format on' enables auto-formating after disabling it by above comment.
# Clang-format cannot auto-format lambdas, directives, bit fields in structs properly.

AccessModifierOffset: -4

AlignAfterOpenBracket: AlwaysBreak
AlignArrayOfStructures: Right
AlignConsecutiveAssignments:
    Enabled: true
    AlignCompound: true
    PadOperators: true
AlignConsecutiveBitFields: AcrossEmptyLinesAndComments
AlignConsecutiveDeclarations: Consecutive
AlignConsecutiveMacros:
    Enabled: true
    AcrossEmptyLines: true
    AcrossComments: true
AlignEscapedNewlinesLeft: Right
AlignOperands: DontAlign
AlignTrailingComments: true

AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLambdasOnASingleLine: None
AllowShortLoopsOnASingleLine: false

AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: Yes

#AttributeMacros: ['']

BinPackArguments: true
BinPackParameters: false

#BitFieldColonSpacing: Both

BraceWrapping:
    AfterCaseLabel: true
    AfterClass: true
    AfterControlStatement: true
    AfterEnum: true
    AfterFunction: true
    AfterNamespace: true
    AfterStruct: true
    AfterUnion: true
    AfterExternBlock: true
    BeforeCatch: true
    BeforeElse: true
    BeforeLambdaBody: true
    BeforeWhile: true
    IndentBraces: false
    SplitEmptyFunction: true
    SplitEmptyRecord: true
    SplitEmptyNamespace: true

BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
#BreakBeforeConceptDeclarations: true
BreakBeforeInheritanceComma: false
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeComma
BreakInheritanceList: BeforeComma
BreakStringLiterals: false

ColumnLimit: 0

CompactNamespaces: false

ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4

ContinuationIndentWidth: 4

Cpp11BracedListStyle: false

DeriveLineEnding: false
DerivePointerAlignment: false

#EmptyLineAfterAccessModifier: Never
#EmptyLineBeforeAccessModifier: LogicalBlock

FixNamespaceComments: true

#IndentAccessModifiers: false
IndentCaseBlocks: false
IndentCaseLabels: true
IndentExternBlock: true
IndentGotoLabels: true
IndentPPDirectives: BeforeHash
#IndentRequires: true
IndentWidth: 4
IndentWrappedFunctionNames: true

#InsertTrailingCommas: None

KeepEmptyLinesAtTheStartOfBlocks: false

#LambdaBodyIndentation: Signature

Language: Cpp

MaxEmptyLinesToKeep: 1

NamespaceIndentation: All

#PPIndentWidth: -1

PointerAlignment: Left

#QualifierAlignment: Custom
#QualifierOrder: ['volatile', 'inline', 'static', 'const', 'constexpr', 'type']

#ReferenceAlignment: Left

ReflowComments: true

#ShortNamespaceLines: 0

SortIncludes: false
SortUsingDeclarations: false

SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
#SpaceAroundPointerQualifiers: Default
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: Never
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false

SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInConditionalStatement: true
SpacesInContainerLiterals: false
SpacesInParentheses: true
SpacesInSquareBrackets: false

Standard: Latest

TabWidth: 4

UseCRLF: true
UseTab: Never

#WhitespaceSensitiveMacros: ['']
