| 1 |
# Style tries to match doxygen's source code style (not perfect) |
| 2 |
|
| 3 |
BasedOnStyle: LLVM |
| 4 |
|
| 5 |
# Do not reflow lines or comments; keeps existing wrapping/spacing. |
| 6 |
ColumnLimit: 0 |
| 7 |
ReflowComments: false |
| 8 |
|
| 9 |
# Preserve include order and grouping exactly as written. |
| 10 |
SortIncludes: Never |
| 11 |
IncludeBlocks: Preserve |
| 12 |
SortUsingDeclarations: false |
| 13 |
|
| 14 |
# Indentation |
| 15 |
UseTab: Never |
| 16 |
IndentWidth: 2 |
| 17 |
ContinuationIndentWidth: 2 |
| 18 |
NamespaceIndentation: None |
| 19 |
IndentPPDirectives: None |
| 20 |
IndentCaseLabels: false |
| 21 |
IndentGotoLabels: false |
| 22 |
IndentAccessModifiers : true |
| 23 |
|
| 24 |
# Braces: Allman style (brace on next line for functions, classes, control). |
| 25 |
BreakBeforeBraces: Custom |
| 26 |
BraceWrapping: |
| 27 |
AfterCaseLabel: true |
| 28 |
AfterClass: true |
| 29 |
AfterControlStatement: true |
| 30 |
AfterEnum: true |
| 31 |
AfterFunction: true |
| 32 |
AfterNamespace: true |
| 33 |
AfterObjCDeclaration: true |
| 34 |
AfterStruct: true |
| 35 |
AfterUnion: true |
| 36 |
AfterExternBlock: true |
| 37 |
BeforeCatch: true |
| 38 |
BeforeElse: true |
| 39 |
BeforeLambdaBody: false |
| 40 |
BeforeWhile: false |
| 41 |
IndentBraces: false |
| 42 |
SplitEmptyFunction: true |
| 43 |
SplitEmptyRecord: true |
| 44 |
SplitEmptyNamespace: true |
| 45 |
|
| 46 |
# Access specifiers are indented like members in the file. |
| 47 |
AccessModifierOffset: 0 |
| 48 |
EmptyLineBeforeAccessModifier: Never |
| 49 |
|
| 50 |
# Short things on one line are common (e.g., inline ctor bodies). |
| 51 |
AllowShortFunctionsOnASingleLine: All |
| 52 |
AllowShortIfStatementsOnASingleLine: true |
| 53 |
AllowShortLoopsOnASingleLine: true |
| 54 |
AllowShortCaseLabelsOnASingleLine: true |
| 55 |
AllowShortLambdasOnASingleLine: All |
| 56 |
AllowAllArgumentsOnNextLine: true |
| 57 |
AllowAllParametersOfDeclarationOnNextLine: true |
| 58 |
|
| 59 |
# Initializer lists |
| 60 |
BreakConstructorInitializers: AfterColon |
| 61 |
AllowAllConstructorInitializersOnNextLine: true |
| 62 |
ConstructorInitializerAllOnOneLineOrOnePerLine: false |
| 63 |
|
| 64 |
# Spacing |
| 65 |
SpaceBeforeParens: ControlStatements |
| 66 |
SpacesInParentheses: false |
| 67 |
SpacesInSquareBrackets: false |
| 68 |
SpacesInAngles: false |
| 69 |
SpaceBeforeSquareBrackets: false |
| 70 |
SpaceAfterCStyleCast: false |
| 71 |
|
| 72 |
# Pointer/reference binding matches code: `Type *name`, `Type &name`. |
| 73 |
DerivePointerAlignment: false |
| 74 |
PointerAlignment: Right |
| 75 |
ReferenceAlignment: Right |
| 76 |
|
| 77 |
# Keep existing alignment/columns where possible. |
| 78 |
AlignTrailingComments: true |
| 79 |
AlignOperands: true |
| 80 |
AlignConsecutiveAssignments: AcrossEmptyLinesAndComments |
| 81 |
AlignConsecutiveDeclarations: AcrossEmptyLinesAndComments |
| 82 |
AlignConsecutiveMacros: None |
| 83 |
AlignEscapedNewlines: DontAlign |
| 84 |
AlignAfterOpenBracket: Align |
| 85 |
BreakBeforeBinaryOperators: None |
| 86 |
|
| 87 |
# Keep moderate vertical spacing, don't aggressively collapse empties. |
| 88 |
KeepEmptyLinesAtTheStartOfBlocks: true |
| 89 |
MaxEmptyLinesToKeep: 2 |
| 90 |
|
| 91 |
# Avoid changing braced-init formatting in ways that could churn. |
| 92 |
Cpp11BracedListStyle: false |
| 93 |
|
| 94 |
# Avoid messing with some macros |
| 95 |
WhitespaceSensitiveMacros: |
| 96 |
- SRCLANGEXT |
| 97 |
- ML_TYPE |
| 98 |
- TSPEC0 |
| 99 |
- TSPEC |
| 100 |
- ETYPE |
| 101 |
|