-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclang-format
More file actions
69 lines (67 loc) · 2.03 KB
/
clang-format
File metadata and controls
69 lines (67 loc) · 2.03 KB
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
---
# C++ Formatting rules for Polymath Code Standard
# See https://releases.llvm.org/14.0.0/tools/clang/docs/ClangFormatStyleOptions.html for documentation of these options
BasedOnStyle: Google
IndentWidth: 2
ColumnLimit: 120
AccessModifierOffset: -2
AlignAfterOpenBracket: AlwaysBreak
AlignConsecutiveAssignments: None
AlignConsecutiveDeclarations: None
AlignEscapedNewlines: Left
AlignTrailingComments: false
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Empty
AllowShortFunctionsOnASingleLine: false
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
AfterClass: true
AfterControlStatement: MultiLine
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakBeforeBraces: Custom
BreakConstructorInitializers: BeforeComma
CompactNamespaces: false
ContinuationIndentWidth: 2
ConstructorInitializerIndentWidth: 0
DerivePointerAlignment: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
FixNamespaceComments: true
IncludeBlocks: Regroup
IncludeCategories:
# Headers in <> with .h extension (best guess at C system headers)
- Regex: '<([A-Za-z0-9\Q/-_\E])+\.h>'
Priority: 1
# Headers in <> without extension (C++ system headers)
- Regex: '<([A-Za-z0-9\Q/-_\E])+>'
Priority: 2
# Headers in <> with other extensions.
- Regex: '<([A-Za-z0-9.\Q/-_\E])+>'
Priority: 3
# Headers in ""
- Regex: '"([A-Za-z0-9.\Q/-_\E])+"'
Priority: 4
IndentAccessModifiers: false
IndentPPDirectives: BeforeHash
PackConstructorInitializers: Never
PointerAlignment: Middle
ReferenceAlignment: Middle
ReflowComments: false
SeparateDefinitionBlocks: Always
SortIncludes: CaseInsensitive
SpacesBeforeTrailingComments: 2