@@ -104,6 +104,284 @@ New check aliases
104
104
Changes in existing checks
105
105
^^^^^^^^^^^^^^^^^^^^^^^^^^
106
106
107
+ <<<<<<< HEAD
108
+ =======
109
+ - Improved :doc: `bugprone-assert-side-effect
110
+ <clang-tidy/checks/bugprone/assert-side-effect>` check by detecting side
111
+ effect from calling a method with non-const reference parameters.
112
+
113
+ - Improved :doc: `bugprone-assignment-in-if-condition
114
+ <clang-tidy/checks/bugprone/assignment-in-if-condition>` check by ignoring
115
+ assignments in the C++20 ``requires `` clause.
116
+
117
+ - Improved :doc: `bugprone-casting-through-void
118
+ <clang-tidy/checks/bugprone/casting-through-void>` check by ignoring casts
119
+ where source is already a ``void` `` pointer, making middle ``void `` pointer
120
+ casts bug-free.
121
+
122
+ - Improved :doc: `bugprone-forwarding-reference-overload
123
+ <clang-tidy/checks/bugprone/forwarding-reference-overload>`
124
+ check to ignore deleted constructors which won't hide other overloads.
125
+
126
+ - Improved :doc: `bugprone-implicit-widening-of-multiplication-result
127
+ <clang-tidy/checks/bugprone/implicit-widening-of-multiplication-result>` check
128
+ by adding an option to ignore constant expressions of signed integer types
129
+ that fit in the source expression type.
130
+
131
+ - Improved :doc: `bugprone-inc-dec-in-conditions
132
+ <clang-tidy/checks/bugprone/inc-dec-in-conditions>` check to ignore code
133
+ within unevaluated contexts, such as ``decltype ``.
134
+
135
+ - Improved :doc: `bugprone-lambda-function-name<clang-tidy/checks/bugprone/lambda-function-name> `
136
+ check by ignoring ``__func__ `` macro in lambda captures, initializers of
137
+ default parameters and nested function declarations.
138
+
139
+ - Improved :doc: `bugprone-multi-level-implicit-pointer-conversion
140
+ <clang-tidy/checks/bugprone/multi-level-implicit-pointer-conversion>` check
141
+ by ignoring implicit pointer conversions that are part of a cast expression.
142
+
143
+ - Improved :doc: `bugprone-non-zero-enum-to-bool-conversion
144
+ <clang-tidy/checks/bugprone/non-zero-enum-to-bool-conversion>` check by
145
+ eliminating false positives resulting from direct usage of bitwise operators
146
+ within parentheses.
147
+
148
+ - Improved :doc: `bugprone-optional-value-conversion
149
+ <clang-tidy/checks/bugprone/optional-value-conversion>` check by eliminating
150
+ false positives resulting from use of optionals in unevaluated context.
151
+
152
+ - Improved :doc: `bugprone-sizeof-expression
153
+ <clang-tidy/checks/bugprone/sizeof-expression>` check by clarifying the
154
+ diagnostics, eliminating some false positives and adding a new
155
+ (off-by-default) option `WarnOnSizeOfPointer ` that reports all
156
+ ``sizeof(pointer) `` expressions (except for a few that are idiomatic).
157
+
158
+ - Improved :doc: `bugprone-suspicious-include
159
+ <clang-tidy/checks/bugprone/suspicious-include>` check by replacing the local
160
+ options `HeaderFileExtensions ` and `ImplementationFileExtensions ` by the
161
+ global options of the same name.
162
+
163
+ - Improved :doc: `bugprone-too-small-loop-variable
164
+ <clang-tidy/checks/bugprone/too-small-loop-variable>` check by incorporating
165
+ better support for ``const `` loop boundaries.
166
+
167
+ - Improved :doc: `bugprone-unused-local-non-trivial-variable
168
+ <clang-tidy/checks/bugprone/unused-local-non-trivial-variable>` check by
169
+ ignoring local variable with ``[maybe_unused] `` attribute.
170
+
171
+ - Improved :doc: `bugprone-unused-return-value
172
+ <clang-tidy/checks/bugprone/unused-return-value>` check by updating the
173
+ parameter `CheckedFunctions ` to support regexp, avoiding false positive for
174
+ function with the same prefix as the default argument, e.g. ``std::unique_ptr ``
175
+ and ``std::unique ``, avoiding false positive for assignment operator overloading.
176
+
177
+ - Improved :doc: `bugprone-use-after-move
178
+ <clang-tidy/checks/bugprone/use-after-move>` check to also handle
179
+ calls to ``std::forward ``. Fixed sequencing of designated initializers. Fixed
180
+ sequencing of callees: In C++17 and later, the callee of a function is guaranteed
181
+ to be sequenced before the arguments, so don't warn if the use happens in the
182
+ callee and the move happens in one of the arguments.
183
+
184
+ - Improved :doc: `cppcoreguidelines-avoid-non-const-global-variables
185
+ <clang-tidy/checks/cppcoreguidelines/avoid-non-const-global-variables>` check
186
+ with a new option `AllowInternalLinkage ` to disable the warning for variables
187
+ with internal linkage.
188
+
189
+ - Improved :doc: `cppcoreguidelines-macro-usage
190
+ <clang-tidy/checks/cppcoreguidelines/macro-usage>` check by ignoring macro with
191
+ hash preprocessing token.
192
+
193
+ - Improved :doc: `cppcoreguidelines-missing-std-forward
194
+ <clang-tidy/checks/cppcoreguidelines/missing-std-forward>` check by no longer
195
+ giving false positives for deleted functions, by fixing false negatives when only
196
+ a few parameters are forwarded and by ignoring parameters without a name (unused
197
+ arguments).
198
+
199
+ - Improved :doc: `cppcoreguidelines-owning-memory
200
+ <clang-tidy/checks/cppcoreguidelines/owning-memory>` check to properly handle
201
+ return type in lambdas and in nested functions.
202
+
203
+ - Improved :doc: `cppcoreguidelines-prefer-member-initializer
204
+ <clang-tidy/checks/cppcoreguidelines/prefer-member-initializer>` check
205
+ by removing enforcement of rule `C.48
206
+ <https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c48-prefer-in-class-initializers-to-member-initializers-in-constructors-for-constant-initializers> `_,
207
+ which was deprecated since :program: `clang-tidy ` 17. This rule is now covered
208
+ by :doc: `cppcoreguidelines-use-default-member-init
209
+ <clang-tidy/checks/cppcoreguidelines/use-default-member-init>`. Fixed
210
+ incorrect hints when using list-initialization.
211
+
212
+ - Improved :doc: `cppcoreguidelines-special-member-functions
213
+ <clang-tidy/checks/cppcoreguidelines/special-member-functions>` check with a
214
+ new option `AllowImplicitlyDeletedCopyOrMove `, which removes the requirement
215
+ for explicit copy or move special member functions when they are already
216
+ implicitly deleted.
217
+
218
+ - Improved :doc: `google-build-namespaces
219
+ <clang-tidy/checks/google/build-namespaces>` check by replacing the local
220
+ option `HeaderFileExtensions ` by the global option of the same name.
221
+
222
+ - Improved :doc: `google-explicit-constructor
223
+ <clang-tidy/checks/google/explicit-constructor>` check to better handle
224
+ C++20 `explicit(bool) `.
225
+
226
+ - Improved :doc: `google-global-names-in-headers
227
+ <clang-tidy/checks/google/global-names-in-headers>` check by replacing the local
228
+ option `HeaderFileExtensions ` by the global option of the same name.
229
+
230
+ - Improved :doc: `google-runtime-int <clang-tidy/checks/google/runtime-int >`
231
+ check performance through optimizations.
232
+
233
+ - Improved :doc: `hicpp-signed-bitwise <clang-tidy/checks/hicpp/signed-bitwise >`
234
+ check by ignoring false positives involving positive integer literals behind
235
+ implicit casts when `IgnorePositiveIntegerLiterals ` is enabled.
236
+
237
+ - Improved :doc: `hicpp-ignored-remove-result <clang-tidy/checks/hicpp/ignored-remove-result >`
238
+ check by ignoring other functions with same prefixes as the target specific
239
+ functions.
240
+
241
+ - Improved :doc: `linuxkernel-must-check-errs
242
+ <clang-tidy/checks/linuxkernel/must-check-errs>` check documentation to
243
+ consistently use the check's proper name.
244
+
245
+ - Improved :doc: `llvm-header-guard
246
+ <clang-tidy/checks/llvm/header-guard>` check by replacing the local
247
+ option `HeaderFileExtensions ` by the global option of the same name.
248
+
249
+ - Improved :doc: `misc-const-correctness
250
+ <clang-tidy/checks/misc/const-correctness>` check by avoiding infinite recursion
251
+ for recursive functions with forwarding reference parameters and reference
252
+ variables which refer to themselves.
253
+
254
+ - Improved :doc: `misc-definitions-in-headers
255
+ <clang-tidy/checks/misc/definitions-in-headers>` check by replacing the local
256
+ option `HeaderFileExtensions ` by the global option of the same name.
257
+ Additionally, the option `UseHeaderFileExtensions ` is removed, so that the
258
+ check uses the `HeaderFileExtensions ` option unconditionally.
259
+
260
+ - Improved :doc: `misc-header-include-cycle
261
+ <clang-tidy/checks/misc/header-include-cycle>` check by avoiding crash for self
262
+ include cycles.
263
+
264
+ - Improved :doc: `misc-unused-using-decls
265
+ <clang-tidy/checks/misc/unused-using-decls>` check by replacing the local
266
+ option `HeaderFileExtensions ` by the global option of the same name.
267
+
268
+ - Improved :doc: `misc-use-anonymous-namespace
269
+ <clang-tidy/checks/misc/use-anonymous-namespace>` check by replacing the local
270
+ option `HeaderFileExtensions ` by the global option of the same name.
271
+
272
+ - Improved :doc: `modernize-avoid-c-arrays
273
+ <clang-tidy/checks/modernize/avoid-c-arrays>` check by introducing the new
274
+ `AllowStringArrays ` option, enabling the exclusion of array types with deduced
275
+ length initialized from string literals.
276
+
277
+ - Improved :doc: `modernize-loop-convert
278
+ <clang-tidy/checks/modernize/loop-convert>` check by ensuring that fix-its
279
+ don't remove parentheses used in ``sizeof `` calls when they have array index
280
+ accesses as arguments.
281
+
282
+ - Improved :doc: `modernize-use-constraints
283
+ <clang-tidy/checks/modernize/use-constraints>` check by fixing a crash that
284
+ occurred in some scenarios and excluding system headers from analysis.
285
+
286
+ - Improved :doc: `modernize-use-nullptr
287
+ <clang-tidy/checks/modernize/use-nullptr>` check to include support for C23,
288
+ which also has introduced the ``nullptr `` keyword.
289
+
290
+ - Improved :doc: `modernize-use-override
291
+ <clang-tidy/checks/modernize/use-override>` check to also remove any trailing
292
+ whitespace when deleting the ``virtual `` keyword.
293
+
294
+ - Improved :doc: `modernize-use-starts-ends-with
295
+ <clang-tidy/checks/modernize/use-starts-ends-with>` check to also handle
296
+ calls to ``compare `` method.
297
+
298
+ - Improved :doc: `modernize-use-std-print
299
+ <clang-tidy/checks/modernize/use-std-print>` check to not crash if the
300
+ format string parameter of the function to be replaced is not of the
301
+ expected type.
302
+
303
+ - Improved :doc: `modernize-use-using <clang-tidy/checks/modernize/use-using >`
304
+ check by adding support for detection of typedefs declared on function level.
305
+
306
+ - Improved :doc: `performance-inefficient-vector-operation
307
+ <clang-tidy/checks/performance/inefficient-vector-operation>` fixing false
308
+ negatives caused by different variable definition type and variable initial
309
+ value type in loop initialization expression.
310
+
311
+ - Improved :doc: `performance-move-const-arg
312
+ <clang-tidy/checks/performance/move-const-arg>` check by ignoring
313
+ ``std::move() `` calls when their target is used as an rvalue.
314
+
315
+ - Improved :doc: `performance-unnecessary-copy-initialization
316
+ <clang-tidy/checks/performance/unnecessary-copy-initialization>` check by
317
+ detecting more cases of constant access. In particular, pointers can be
318
+ analyzed, so the check now handles the common patterns
319
+ `const auto e = (*vector_ptr)[i] ` and `const auto e = vector_ptr->at(i); `.
320
+ Calls to mutable function where there exists a `const ` overload are also
321
+ handled. Fix crash in the case of a non-member operator call.
322
+
323
+ - Improved :doc: `performance-unnecessary-value-param
324
+ <clang-tidy/checks/performance/unnecessary-value-param>` check
325
+ detecting more cases for template functions including lambdas with ``auto ``.
326
+ E.g., ``std::sort(a.begin(), a.end(), [](auto x, auto y) { return a > b; }); ``
327
+ will be detected for expensive to copy types. Fixed false positives for
328
+ dependent call expressions.
329
+
330
+ - Improved :doc: `readability-avoid-return-with-void-value
331
+ <clang-tidy/checks/readability/avoid-return-with-void-value>` check by adding
332
+ fix-its.
333
+
334
+ - Improved :doc: `readability-const-return-type
335
+ <clang-tidy/checks/readability/const-return-type>` check to eliminate false
336
+ positives when returning types with const not at the top level.
337
+
338
+ - Improved :doc: `readability-container-size-empty
339
+ <clang-tidy/checks/readability/container-size-empty>` check to prevent false
340
+ positives when utilizing ``size `` or ``length `` methods that accept parameter.
341
+ Fixed crash when facing template user defined literals.
342
+
343
+ - Improved :doc: `readability-duplicate-include
344
+ <clang-tidy/checks/readability/duplicate-include>` check by excluding include
345
+ directives that form the filename using macro.
346
+
347
+ - Improved :doc: `readability-else-after-return
348
+ <clang-tidy/checks/readability/else-after-return>` check to ignore
349
+ `if consteval ` statements, for which the `else ` branch must not be removed.
350
+
351
+ - Improved :doc: `readability-identifier-naming
352
+ <clang-tidy/checks/readability/identifier-naming>` check in `GetConfigPerFile `
353
+ mode by resolving symbolic links to header files. Fixed handling of Hungarian
354
+ Prefix when configured to `LowerCase `. Added support for renaming designated
355
+ initializers. Added support for renaming macro arguments. Fixed renaming
356
+ conflicts arising from out-of-line member function template definitions.
357
+
358
+ - Improved :doc: `readability-implicit-bool-conversion
359
+ <clang-tidy/checks/readability/implicit-bool-conversion>` check to provide
360
+ valid fix suggestions for ``static_cast `` without a preceding space and
361
+ fixed problem with duplicate parentheses in double implicit casts. Corrected
362
+ the fix suggestions for C23 and later by using C-style casts instead of
363
+ ``static_cast ``. Fixed false positives in C++20 spaceship operator by ignoring
364
+ casts in implicit and defaulted functions.
365
+
366
+ - Improved :doc: `readability-redundant-inline-specifier
367
+ <clang-tidy/checks/readability/redundant-inline-specifier>` check to properly
368
+ emit warnings for static data member with an in-class initializer.
369
+
370
+ - Improved :doc: `readability-redundant-member-init
371
+ <clang-tidy/checks/readability/redundant-member-init>` check to avoid
372
+ false-positives when type of the member does not match the type of the
373
+ initializer.
374
+
375
+ - Improved :doc: `readability-redundant-smartptr-get
376
+ <clang-tidy/checks/readability/redundant-smartptr-get>` check to
377
+ remove '->', when reduntant get() is removed.
378
+
379
+ - Improved :doc: `readability-static-accessed-through-instance
380
+ <clang-tidy/checks/readability/static-accessed-through-instance>` check to
381
+ support calls to overloaded operators as base expression and provide fixes to
382
+ expressions with side-effects.
383
+
384
+ >>>>>>> 0421519378d8 (clang-tidy: readability-redundant-smartptr-get does not remove (#97964))
107
385
- Improved :doc: `readability-simplify-boolean-expr
108
386
<clang-tidy/checks/readability/simplify-boolean-expr>` check to avoid to emit
109
387
warning for macro when IgnoreMacro option is enabled and improve messages
0 commit comments