-
Notifications
You must be signed in to change notification settings - Fork 34
/
.clang-format
42 lines (42 loc) · 1.2 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
# This file is used by clang-format to autoformat DIOPI source code
#
# The clang-format is part of llvm toolchain.
# It need to install llvm and clang to format source code style.
#
# The basic usage is,
# clang-format -i -style=file PATH/TO/SOURCE/CODE
#
# The -style=file implicit use ".clang-format" file located in one of
# parent directory.
# The -i means inplace change.
#
# The document of clang-format is
# http://clang.llvm.org/docs/ClangFormat.html
# http://clang.llvm.org/docs/ClangFormatStyleOptions.html
---
Language: Cpp
BasedOnStyle: Google
IndentWidth: 4
TabWidth: 4
ContinuationIndentWidth: 4
AccessModifierOffset: -4 # The private/protected/public has no indent in class
Standard: Cpp11
AllowAllParametersOfDeclarationOnNextLine: true
BinPackParameters: true
BinPackArguments: false
BreakAfterAttributes: Leave
ColumnLimit: 160
DerivePointerAlignment: false
PointerAlignment: Left
ReferenceAlignment: Left
InsertNewlineAtEOF: true
SpacesBeforeTrailingComments: 2
IncludeIsMainSourceRegex: (\.cu)$
IncludeCategories:
- Regex: '^<.*\.h(pp)?>'
Priority: 1
- Regex: '^<.*'
Priority: 2
- Regex: '.*'
Priority: 3
...