-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.clang-tidy
More file actions
45 lines (38 loc) · 1.4 KB
/
.clang-tidy
File metadata and controls
45 lines (38 loc) · 1.4 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
Checks: >
-*,
bugprone-*,
-bugprone-easily-swappable-parameters,
clang-analyzer-*,
performance-*,
modernize-*,
performance-unnecessary-copy-initialization,
performance-unnecessary-value-param,
performance-move-const-arg,
performance-no-automatic-move,
performance-inefficient-vector-operation,
performance-inefficient-string-concatenation,
performance-trivially-destructible,
# Crucial for cache/memory
cppcoreguidelines-pro-type-member-init,
cppcoreguidelines-no-malloc,
modernize-pass-by-value,
modernize-use-emplace,
# Low-level sanity
misc-*,
-misc-unused-parameters,
readability-*,
-readability-identifier-length,
-readability-function-cognitive-complexity
CheckOptions:
# High-performance threshold: keep functions smaller to encourage inlining
readability-function-size.LineThreshold: 200
# Strict snake_case for the C-API interface
readability-identifier-naming.VariableCase: snake_case
readability-identifier-naming.FunctionCase: snake_case
readability-identifier-naming.ParameterCase: snake_case
# Magic numbers: Only allow 0, 1, and 2.
# Powers of 2 must be named constants (e.g., CACHE_LINE_SIZE)
readability-magic-numbers.IgnoredIntegerValues: "0;1;2"
readability-magic-numbers.IgnorePowersOfTwoValue: false
# Vector optimization: Flag if we don't reserve space
performance-inefficient-vector-operation.EnableImplicitConverters: true