Skip to content

Commit d631832

Browse files
authored
[Infrastructure] Clang-Tidy: Promote bad casts to errors (#18515)
1 parent fc4710c commit d631832

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

‎.clang-tidy‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Checks:
4242
- google-default-arguments
4343
# - google-explicit-constructor # triggered for O2 columns
4444
- google-global-names-in-headers
45+
- google-readability-casting # same as cpplint:readability/casting
4546
# - misc-const-correctness # to be checked
4647
- misc-header-include-cycle
4748
- misc-include-cleaner
@@ -111,8 +112,6 @@ WarningsAsErrors: >-
111112
*,
112113
-readability-braces-around-statements,
113114
-readability-suspicious-call-argument,
114-
-modernize-*,
115-
-readability-*,
116115
-bugprone-assignment-in-if-condition,
117116
-bugprone-branch-clone,
118117
-bugprone-copy-constructor-init,
@@ -140,17 +139,20 @@ WarningsAsErrors: >-
140139
-cppcoreguidelines-missing-std-forward,
141140
-cppcoreguidelines-prefer-member-initializer,
142141
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
143-
-cppcoreguidelines-pro-type-const-cast,
144-
-cppcoreguidelines-pro-type-cstyle-cast,
145142
-cppcoreguidelines-pro-type-member-init,
146-
-cppcoreguidelines-pro-type-reinterpret-cast,
147-
-cppcoreguidelines-pro-type-static-cast-downcast,
148143
-cppcoreguidelines-pro-type-union-access,
149144
-cppcoreguidelines-slicing,
150145
-cppcoreguidelines-virtual-class-destructor,
146+
-modernize-*,
147+
-readability-*,
148+
readability-redundant-casting,
151149
# Positives for the following checks are currently being fixed and should be reported as errors.
152150
# clang-analyzer-*
153151
# clang-diagnostic-*
152+
# cppcoreguidelines-pro-type-const-cast
153+
# cppcoreguidelines-pro-type-cstyle-cast
154+
# cppcoreguidelines-pro-type-reinterpret-cast
155+
# cppcoreguidelines-pro-type-static-cast-downcast
154156
# google-default-arguments
155157
# misc-include-cleaner
156158
# misc-redundant-expression

0 commit comments

Comments
 (0)