-
Notifications
You must be signed in to change notification settings - Fork 782
Expand file tree
/
Copy path.clang-format
More file actions
52 lines (52 loc) · 1.34 KB
/
.clang-format
File metadata and controls
52 lines (52 loc) · 1.34 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
BasedOnStyle: Google
Language: Cpp
PointerBindsToType: true
AlignTrailingComments:
Kind: Always
IncludeBlocks: Regroup
IncludeCategories:
# Priority 1: Standard C/C++ headers (angle brackets) - separated by blank line
- Regex: '^<[a-z_]+>$'
Priority: 1
SortPriority: 1
# Priority 2: All other headers (no blank lines between them, sorted by SortPriority)
# gtest/gmock headers (angle brackets, but not standard headers)
- Regex: '^<g(test|mock)/.*>$'
Priority: 2
SortPriority: 2
# absl headers
- Regex: '^"absl/.*"$'
Priority: 2
SortPriority: 3
# llvm headers
- Regex: '^"llvm/.*"$'
Priority: 2
SortPriority: 4
# mlir headers
- Regex: '^"mlir/.*"$'
Priority: 2
SortPriority: 5
# third_party libraries
- Regex: '^"third_party/.*"$'
Priority: 2
SortPriority: 6
# google (protobuf, etc.) headers
- Regex: '^"google/.*"$'
Priority: 2
SortPriority: 7
# xla headers (including xla/tsl)
- Regex: '^"xla/.*"$'
Priority: 2
SortPriority: 100
# tsl headers (without xla/ prefix)
- Regex: '^"tsl/.*"$'
Priority: 2
SortPriority: 101
# triton headers
- Regex: '^"triton/.*"$'
Priority: 2
SortPriority: 102
# Default catch-all for any other headers (IMPORTANT: ordered before XLA)
- Regex: '.*'
Priority: 2
SortPriority: 8