---
Language: C
BasedOnStyle: LLVM

UseTab: ForIndentation
TabWidth: 4
IndentWidth: 4
ContinuationIndentWidth: 4

BreakBeforeBraces: Custom
BraceWrapping:
  AfterFunction: true
  AfterControlStatement: Always
  AfterStruct: true
  AfterEnum: true
  AfterUnion: true
  BeforeElse: true
  BeforeCatch: true
  IndentBraces: false
  # NOTE(aalhendi): Prefer scoped case bodies when touching switches.
  # clang-format formats braced cases, but it does not insert braces.
  AfterCaseLabel: true

PointerAlignment: Right
ReferenceAlignment: Right

SpaceAfterCStyleCast: false
SpaceBeforeParens: Custom
SpaceBeforeParensOptions:
  AfterControlStatements: true
  AfterFunctionDefinitionName: false
  AfterFunctionDeclarationName: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeAssignmentOperators: true
SpacesBeforeTrailingComments: 1

AlignConsecutiveMacros: AcrossEmptyLinesAndComments
AlignConsecutiveDeclarations: None
AlignEscapedNewlines: Left
AlignOperands: Align
AlignTrailingComments: true

ColumnLimit: 160
InsertNewlineAtEOF: true

SortIncludes: Never
IncludeBlocks: Preserve

AllowShortFunctionsOnASingleLine: None
AllowShortBlocksOnASingleLine: Never
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
BreakBeforeBinaryOperators: None
BreakBeforeTernaryOperators: true
IndentCaseLabels: false
IndentCaseBlocks: false
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 2
SpaceInEmptyBlock: false
...
