BasedOnStyle: LLVM
IndentWidth: 4
TabWidth: 4
UseTab: Never

BreakBeforeBraces: Custom
BraceWrapping:
  AfterFunction: true
  AfterControlStatement: false
  AfterStruct: false
  AfterEnum: false
  AfterUnion: false
  BeforeElse: false
  BeforeCatch: false

AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty

PointerAlignment: Right
ReferenceAlignment: Right

ColumnLimit: 100

IndentCaseLabels: true
SpaceBeforeParens: ControlStatements

SortIncludes: false

AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false

Cpp11BracedListStyle: false
Standard: Latest

# Copied from: https://github.com/pytorch/pytorch/blob/main/.clang-format
StatementMacros:
  - PyObject_HEAD
  - PyVarObject_HEAD_INIT
