-
Notifications
You must be signed in to change notification settings - Fork 4
/
.clangd
76 lines (73 loc) · 1.96 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
CompileFlags:
Add: [
# enable c++23 support
-std=c++2b,
# constexpr args need to be tweeked a bit
-fconstexpr-depth=1000000000,
-fconstexpr-steps=12712420,
-fbracket-depth=4096,
# warning flags to be enabled
-Wall,
-Wextra,
-Wpedantic,
-Wshadow,
-Wdouble-promotion,
-Wformat=2,
-Wundef,
-Wmissing-include-dirs,
-Wstrict-aliasing,
-Wstrict-overflow=5,
-Walloca,
-Wwrite-strings,
-Wdate-time,
-Wpacked,
-Wnested-externs,
-Wcast-qual,
-Wcast-align,
-Wunused-macros,
-Wreserved-id-macro,
-Wbad-function-cast,
-Wbitfield-enum-conversion,
-Wextra-semi-stmt,
-Wold-style-cast,
-Wcovered-switch-default,
-Wmissing-requires,
-Wuninitialized,
-Wsuggest-final-types,
-Wlogical-op,
-Wimplicit-fallthrough=5,
-Wbitwise-instead-of-logical,
-Wassign-enum,
-Wcomma,
-Wcompletion-handler,
# can try enabling this just to see what breaks (still compiles as of clang 11)
# be sure to enable (well, disable) the below flags else a *lot* of "errors"
-Weverything,
-Wno-c++98-compat,
-Wno-c++98-compat-pedantic,
-Wno-c++20-compat,
-Wno-unused-parameter,
# -Wno-unused-variable,
-Wno-conversion,
-Wno-sign-conversion,
-Wno-missing-prototypes,
-Wno-padded,
-Wno-switch-enum,
-Wno-gnu-label-as-value]
Remove: [
-std=*,
-W*,
-fimplicit-constexpr]
Diagnostics:
# Tweak Clang-Tidy checks.
ClangTidy:
Add: [performance*, modernize*, readability*]
Remove: [
readability-implicit-bool-conversion,
readability-else-after-return,
readability-redundant-access-specifiers,
readability-magic-numbers,
readability-identifier-length,
readability-function-cognitive-complexity,
readability-qualified-auto,
modernize-avoid-c-arrays]