-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.clangd
60 lines (56 loc) · 1.69 KB
/
.clangd
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
---
If:
PathExclude: [.*\.c, .*\.h]
CompileFlags:
# Treat code as C++, use C++20 standard, enable all warnings.
Add:
- "-Weverything"
- "-xc++"
- "-std=c++2b"
- "-fsanitize=address"
- "-fsanitize=undefined"
- "-fdiagnostics-show-option"
# - "-fsanitize=thread" # Not allowed with fsanitize=address
- "--analyze"
# Disable unwanted warnings.
- "-Wno-c++98-compat"
- "-Wno-c++98-compat-pedantic"
- "-Wno-zero-as-null-pointer-constant"
- "-Wno-c++20-compat"
Diagnostics:
# Tweak Clang-Tidy checks.
ClangTidy:
Add:
[
bugprone*
cert*
clang-analyzer*
concurrency*
cppcoreguidelines*
google*
hicpp*
misc*
modernize*
performance*
readability*
-google-objc*
]
Remove: [
# modernize-use-trailing-return-type,
# Redundant aliases
hicpp-avoid-c-arrays,
cppcoreguidelines-avoid-c-arrays,
cppcoreguidelines-avoid-magic-numbers,
]
CheckOptions:
misc-non-private-member-variables-in-classes.IgnorePublicMemberVariables: 1
readability-identifier-naming.ParameterIgnoredRegexp: ^_.*$
readability-identifier-naming.PrivateMemberIgnoredRegexp: ^C_.*$
readability-identifier-naming.VariableCase: lower_case
readability-identifier-naming.ClassCase: CamelCase
readability-identifier-naming.ConstantCase: UPPER_CASE
readability-identifier-naming.FunctionCase: lower_case
readability-identifier-naming.MethodCase: lower_case
readability-identifier-naming.ParameterCase: lower_case
readability-identifier-naming.PrivateMemberPrefix: m_
UnusedIncludes: Strict