aboutsummaryrefslogtreecommitdiff
path: root/.clang-format
blob: facbea5f3156a7c821da60526a61cb5595cf9927 (plain) (blame)
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
# $FreeBSD$
# Basic .clang-format
---
BasedOnStyle: WebKit
AlignAfterOpenBracket: DontAlign
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Left
AlignOperands: false
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: InlineOnly
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: TopLevelDefinitions
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
BinPackArguments: true
BinPackParameters: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: WebKit
BreakBeforeTernaryOperators: false
# TODO: BreakStringLiterals can cause very strange formatting so turn it off?
BreakStringLiterals: false
PenaltyBreakBeforeFirstCallParameter: 1000
CompactNamespaces: true
DerivePointerAlignment: false
DisableFormat: false
ForEachMacros:
  - SLIST_FOREACH
  - SLIST_FOREACH_SAFE
  - LIST_FOREACH
  - LIST_FOREACH_SAFE
  - STAILQ_FOREACH
  - STAILQ_FOREACH_SAFE
  - TAILQ_FOREACH
  - TAILQ_FOREACH_SAFE
  - TAILQ_FOREACH_REVERSE
  - TAILQ_FOREACH_REVERSE_SAFE
  - RB_FOREACH
  - RB_FOREACH_SAFE
  - RB_FOREACH_FROM
  - RB_FOREACH_REVERSE
  - RB_FOREACH_REVERSE_FROM
  - RB_FOREACH_REVERSE_SAFE
  - FOREACH_THREAD_IN_PROC
  - FOREACH_PROC_IN_SYSTEM
  - FOREACH_PRISON_CHILD
  - FOREACH_PRISON_DESCENDANT
  - FOREACH_PRISON_DESCENDANT_LOCKED
  - FOREACH_PRISON_DESCENDANT_LOCKED_LEVEL
  - MNT_VNODE_FOREACH_ALL
  - MNT_VNODE_FOREACH_ACTIVE
IndentCaseLabels: false
IndentPPDirectives: None
Language: Cpp
NamespaceIndentation: None
PointerAlignment: Right
ContinuationIndentWidth: 4
IndentWidth: 8
TabWidth: 8
ColumnLimit: 80
UseTab: Always
SpaceAfterCStyleCast: false
SortIncludes: false
KeepEmptyLinesAtTheStartOfBlocks: true
# The options below will only be supported starting with clang 9.0:
# TODO-CLANG-9: TypenameMacros:
# TODO-CLANG-9:   - SLIST_HEAD
# TODO-CLANG-9:   - SLIST_ENTRY
# TODO-CLANG-9:   - TAILQ_ENTRY
# TODO-CLANG-9:   - TAILQ_HEAD
# TODO-CLANG-9:   - STAILQ_ENTRY
# TODO-CLANG-9:   - STAILQ_HEAD
...