summaryrefslogtreecommitdiff
path: root/gdbserver/.clang-format
blob: 2fcbb67fec8b1f70f31c30fde7385a6d13d8f733 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# -*- yaml -*-

# Notes for gdb.
# * labels are not handled gnu-style
#   https://github.com/llvm/llvm-project/issues/24492
#   https://github.com/llvm/llvm-project/issues/53717
# * function call bin-packing is weird
#   https://github.com/llvm/llvm-project/issues/31255
#   https://github.com/llvm/llvm-project/issues/37051
# * gettext calls like "_()" are reformatted to "_ ()"
#   I don't think there's an upstream bug for this yet

Language:        Cpp
# BasedOnStyle:  GNU
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignConsecutiveMacros: false
# FIXME probably needs a decision
AlignEscapedNewlines: Left
AlignOperands:   true
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: false
# This isn't truly needed because
# ConstructorInitializerAllOnOneLineOrOnePerLine is false.
AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: false
# Deprecated, so we don't set it.
# AlwaysBreakAfterDefinitionReturnType: All
AlwaysBreakAfterReturnType: TopLevelDefinitions
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: true
BinPackParameters: true
# Because BreakBeforeBraces = GNU, we don't need BraceWrapping.
BreakBeforeBinaryOperators: All
BreakBeforeBraces: GNU
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeColon
BreakInheritanceList: BeforeColon
BreakStringLiterals: true
ColumnLimit:     79
CommentPragmas:  'ARI'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 2
Cpp11BracedListStyle: false
DeriveLineEnding: false
DerivePointerAlignment: false
DisableFormat:   false
# The docs say not to use this.
# ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
  - ALL_BLOCK_SYMBOLS
  - ALL_BLOCK_SYMBOLS_WITH_NAME
  - ALL_BREAKPOINTS
  - ALL_BREAKPOINTS_SAFE
  - ALL_BP_LOCATIONS
  - ALL_BP_LOCATIONS_AT_ADDR
  # FIXME many more here
IncludeBlocks:   Preserve
IncludeCategories:
  - Regex:           '^"(common-defs.h|defs.h|server.h)/'
    Priority:        -1
# IncludeIsMainRegex: FIXME
IndentCaseLabels: false
# FIXME I think this is not quite right,
# they should be outdented slightly.
IndentGotoLabels: true
IndentPPDirectives: None
IndentWidth:     2
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: false
# MacroBlockBegin: ''
# MacroBlockEnd:   ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
# NamespaceMacros
# PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 200
# PenaltyBreakComment: 300
# PenaltyBreakFirstLessLess: 120
# PenaltyBreakString: 100
# PenaltyBreakTemplateDeclaration: 1000
# PenaltyExcessCharacter: 10
# PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Right
# RawStringFormats: ???
# FIXME - enable
ReflowComments:  false
# FIXME - enable
SortIncludes:    false
SortUsingDeclarations: true
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: Always
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles:  false
SpacesInCStyleCastParentheses: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
# StatementMacros: do we have any?
TabWidth: 8
# TypenameMacros: do we have any?
UseCRLF: false
UseTab: Never