---
Language: Cpp
BasedOnStyle: LLVM

AlignAfterOpenBracket: DontAlign
AlignEscapedNewlines: DontAlign
AlignOperands: Align
AlignTrailingComments: Never
AllowAllParametersOfDeclarationOnNextLine: false
AlwaysBreakAfterDefinitionReturnType: All
BreakBeforeBraces: Allman
ColumnLimit: 0
ContinuationIndentWidth: 2
Cpp11BracedListStyle: false
IncludeBlocks: Regroup
IncludeCategories:
  - Regex: '"config\.h"'
    Priority: -1
    CaseSensitive: true
  - Regex: '"[^/]*"'
    Priority: 0
    SortPriority: 1
    CaseSensitive: true
  - Regex: '".*"'
    Priority: 2
    CaseSensitive: true
  - Regex: '<.*>'
    Priority: 3
    CaseSensitive: true
IndentCaseLabels: true
InsertNewlineAtEOF: true
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 3
SpaceBeforeParens: Always
TabWidth: 2
UseTab: Always
# Buggy workaround to add exceptions to 'SpaceBeforeParens: Always' (see below)
WhitespaceSensitiveMacros:
  - _
# Workaround to avoid some alignment bugs when adding a macro to WhitespaceSensitiveMacros,
# see https://github.com/llvm/llvm-project/issues/55443#issuecomment-1953268337
# This doesn't fix all alignment bugs though, so I'd rather make an exception only for '_',
# and not also for 'N_' or 'I_' for example.
# See also https://github.com/llvm/llvm-project/issues/82288
Macros:
  - _(x)=x
...
