forked from qir-alliance/qat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.clang-format
69 lines (60 loc) · 1.53 KB
/
.clang-format
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
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
---
Language: Cpp
BasedOnStyle: Microsoft
# page width
ColumnLimit: 120
ReflowComments: true
# tabs and indents
UseTab: Never
IndentWidth: 4
TabWidth: 4
AccessModifierOffset: -2
NamespaceIndentation: Inner
# line and statements layout
BreakBeforeBraces: Allman
BinPackParameters: false
AlignAfterOpenBracket: AlwaysBreak
AllowShortIfStatementsOnASingleLine: WithoutElse
AllowShortFunctionsOnASingleLine: Empty
AllowAllConstructorInitializersOnNextLine: false
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: false
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeComma
# misc
Cpp11BracedListStyle: true
FixNamespaceComments: true
IncludeBlocks: Preserve
SpaceBeforeInheritanceColon : true
SpaceBeforeParens: ControlStatements
DerivePointerAlignment: false
PointerAlignment: Left
# Suggestions
Standard: Cpp11
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
AlignTrailingComments: true
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 2
IndentCaseLabels: false
# NamespaceIndentation: None
# Ensures include compleness
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '.*\.\..*'
Priority: 1
- Regex: '^<.*\.h.*>$'
Priority: 5
- Regex: '^<.*>$'
Priority: 6
- Regex: '^"(llvm)/.*"$'
Priority: 4
- Regex: '.*/.*'
Priority: 3
- Regex: '.*'
Priority: 2
IncludeIsMainRegex: ''
SortIncludes: true
SortUsingDeclarations: true
SpaceInEmptyParentheses: false