diff options
Diffstat (limited to 'clang-tools-extra/docs/ReleaseNotes.rst')
| -rw-r--r-- | clang-tools-extra/docs/ReleaseNotes.rst | 160 |
1 files changed, 150 insertions, 10 deletions
diff --git a/clang-tools-extra/docs/ReleaseNotes.rst b/clang-tools-extra/docs/ReleaseNotes.rst index 6701bf2..6d3da61 100644 --- a/clang-tools-extra/docs/ReleaseNotes.rst +++ b/clang-tools-extra/docs/ReleaseNotes.rst @@ -58,6 +58,10 @@ Potentially Breaking Changes :program:`clang-tidy-20`. Users should use the check-specific options of the same name instead. +- Removed `clang-analyzer-*` checks from default checks in :program:`clang-tidy`. + From now on, users should specify explicitly that they want CSA checks to run + in :program:`clang-tidy` via `clang-analyzer-*`. + - Renamed a few :program:`clang-tidy` check options, as they were misspelled: @@ -70,6 +74,13 @@ Potentially Breaking Changes :doc:`bugprone-signed-char-misuse <clang-tidy/checks/bugprone/signed-char-misuse>` +- Modified the custom message format of :doc:`bugprone-unsafe-functions + <clang-tidy/checks/bugprone/unsafe-functions>` by assigning a special meaning + to the character ``>`` at the start of the value of the option + ``CustomFunctions``. If the option value starts with ``>``, then the + replacement suggestion part of the message (which would be included by + default) is omitted. (This does not change the warning locations.) + - :program:`clang-tidy` now displays warnings from all non-system headers by default. Previously, users had to explicitly opt-in to header warnings using `-header-filter='.*'`. To disable warnings from non-system, set `-header-filter` @@ -177,6 +188,10 @@ Improvements to clang-tidy scripts by adding the `-hide-progress` option to suppress progress and informational messages. +- Removed `clang-analyzer-*` check from default checks in :program:`clang-tidy`. + From now on, users should specify explicitly that they want CSA checks to run + in :program:`clang-tidy`. + - Deprecated the :program:`clang-tidy` ``zircon`` module. All checks have been moved to the ``fuchsia`` module instead. The ``zircon`` module will be removed in the 24th release. @@ -184,17 +199,17 @@ Improvements to clang-tidy New checks ^^^^^^^^^^ +- New :doc:`bugprone-derived-method-shadowing-base-method + <clang-tidy/checks/bugprone/derived-method-shadowing-base-method>` check. + + Finds derived class methods that shadow a (non-virtual) base class method. + - New :doc:`bugprone-invalid-enum-default-initialization <clang-tidy/checks/bugprone/invalid-enum-default-initialization>` check. Detects default initialization (to 0) of variables with ``enum`` type where the enum has no enumerator with value of 0. -- New :doc:`bugprone-derived-method-shadowing-base-method - <clang-tidy/checks/bugprone/derived-method-shadowing-base-method>` check. - - Finds derived class methods that shadow a (non-virtual) base class method. - - New :doc:`cppcoreguidelines-pro-bounds-avoid-unchecked-container-access <clang-tidy/checks/cppcoreguidelines/pro-bounds-avoid-unchecked-container-access>` check. @@ -244,6 +259,11 @@ New check aliases <clang-tidy/checks/modernize/avoid-variadic-functions>` keeping initial check as an alias to the new one. +- Renamed :doc:`cert-dcl58-cpp <clang-tidy/checks/cert/dcl58-cpp>` to + :doc:`bugprone-std-namespace-modification + <clang-tidy/checks/bugprone/std-namespace-modification>` + keeping initial check as an alias to the new one. + - Renamed :doc:`cert-env33-c <clang-tidy/checks/cert/env33-c>` to :doc:`bugprone-command-processor <clang-tidy/checks/bugprone/command-processor>` @@ -264,6 +284,55 @@ New check aliases <clang-tidy/checks/bugprone/throwing-static-initialization>` keeping initial check as an alias to the new one. +- Renamed :doc:`cert-err60-cpp <clang-tidy/checks/cert/err60-cpp>` to + :doc:`bugprone-exception-copy-constructor-throws + <clang-tidy/checks/bugprone/exception-copy-constructor-throws>` + +- Renamed :doc:`cert-flp30-c <clang-tidy/checks/cert/flp30-c>` to + :doc:`bugprone-float-loop-counter + <clang-tidy/checks/bugprone/float-loop-counter>` + keeping initial check as an alias to the new one. + +- Renamed :doc:`cert-mem57-cpp <clang-tidy/checks/cert/mem57-cpp>` to + :doc:`bugprone-default-operator-new-on-overaligned-type + <clang-tidy/checks/bugprone/default-operator-new-on-overaligned-type>` + keeping initial check as an alias to the new one. + +- Renamed :doc:`cert-msc30-c <clang-tidy/checks/cert/msc30-c>` to + :doc:`misc-predictable-rand + <clang-tidy/checks/misc/predictable-rand>` + keeping initial check as an alias to the new one. + +- Renamed :doc:`cert-msc32-c <clang-tidy/checks/cert/msc32-c>` to + :doc:`bugprone-random-generator-seed + <clang-tidy/checks/bugprone/random-generator-seed>` + keeping initial check as an alias to the new one. + +- Renamed :doc:`cert-msc50-cpp <clang-tidy/checks/cert/msc50-cpp>` to + :doc:`misc-predictable-rand + <clang-tidy/checks/misc/predictable-rand>` + keeping initial check as an alias to the new one. + +- Renamed :doc:`cert-msc51-cpp <clang-tidy/checks/cert/msc51-cpp>` to + :doc:`bugprone-random-generator-seed + <clang-tidy/checks/bugprone/random-generator-seed>` + keeping initial check as an alias to the new one. + +- Renamed :doc:`cert-oop57-cpp <clang-tidy/checks/cert/oop57-cpp>` to + :doc:`bugprone-raw-memory-call-on-non-trivial-type + <clang-tidy/checks/bugprone/raw-memory-call-on-non-trivial-type>` + keeping initial check as an alias to the new one. + +- Renamed :doc:`cert-oop58-cpp <clang-tidy/checks/cert/oop58-cpp>` to + :doc:`bugprone-copy-constructor-mutates-argument + <clang-tidy/checks/bugprone/copy-constructor-mutates-argument>` + keeping initial check as an alias to the new one. + +- Renamed :doc:`google-readability-casting <clang-tidy/checks/google/readability-casting>` to + :doc:`modernize-avoid-c-style-cast + <clang-tidy/checks/modernize/avoid-c-style-cast>` + keeping initial check as an alias to the new one. + Changes in existing checks ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -275,7 +344,11 @@ Changes in existing checks - Improved :doc:`bugprone-exception-escape <clang-tidy/checks/bugprone/exception-escape>` check's handling of lambdas: exceptions from captures are now diagnosed, exceptions in the bodies of - lambdas that aren't actually invoked are not. + lambdas that aren't actually invoked are not. Additionally, fixed an issue + where the check wouldn't diagnose throws in arguments to functions or + constructors. Added fine-grained configuration via options + `CheckDestructors`, `CheckMoveMemberFunctions`, `CheckMain`, + `CheckedSwapFunctions`, and `CheckNothrowFunctions`. - Improved :doc:`bugprone-infinite-loop <clang-tidy/checks/bugprone/infinite-loop>` check by adding detection for @@ -324,13 +397,26 @@ Changes in existing checks - Improved :doc:`bugprone-unchecked-optional-access <clang-tidy/checks/bugprone/unchecked-optional-access>` check by supporting ``NullableValue::makeValue`` and ``NullableValue::makeValueInplace`` to - prevent false-positives for ``BloombergLP::bdlb::NullableValue`` type. + prevent false-positives for ``BloombergLP::bdlb::NullableValue`` type, and by + adding the `IgnoreValueCalls` option to suppress diagnostics for + ``optional::value()`` and the `IgnoreSmartPointerDereference` option to + ignore optionals reached via smart-pointer-like dereference, while still + diagnosing UB-prone dereferences via ``operator*`` and ``operator->``. - Improved :doc:`bugprone-unhandled-self-assignment <clang-tidy/checks/bugprone/unhandled-self-assignment>` check by adding an additional matcher that generalizes the copy-and-swap idiom pattern detection. +- Improved :doc:`bugprone-unsafe-functions + <clang-tidy/checks/bugprone/unsafe-functions>` check by hiding the default + suffix when the reason starts with the character `>` in the `CustomFunctions` + option. + +- Improved :doc:`bugprone-use-after-move + <clang-tidy/checks/bugprone/use-after-move>` check by adding + `InvalidationFunctions` option to support custom invalidation functions. + - Improved :doc:`cppcoreguidelines-avoid-non-const-global-variables <clang-tidy/checks/cppcoreguidelines/avoid-non-const-global-variables>` check by adding a new option `AllowThreadLocal` that suppresses warnings on @@ -355,6 +441,25 @@ Changes in existing checks adding an option to allow pointer arithmetic via prefix/postfix increment or decrement operators. +- Improved :doc:`cppcoreguidelines-pro-type-member-init + <clang-tidy/checks/cppcoreguidelines/pro-type-member-init>` check to + correctly ignore ``std::array`` and other array-like containers when + `IgnoreArrays` option is set to `true`. + +- Improved :doc:`fuchsia-multiple-inheritance + <clang-tidy/checks/fuchsia/multiple-inheritance>` + by fixing an issue where the check would only analyze the first class with + a given name in the program, missing any subsequent classes with that same + name (declared in a different scope). + +- Improved :doc:`google-readability-casting + <clang-tidy/checks/google/readability-casting>` check by adding fix-it + notes for downcasts and casts to void pointer. + +- Improved :doc:`google-readability-todo + <clang-tidy/checks/google/readability-todo>` check to accept the new TODO + format from the Google Style Guide. + - Improved :doc:`llvm-prefer-isa-or-dyn-cast-in-conditionals <clang-tidy/checks/llvm/prefer-isa-or-dyn-cast-in-conditionals>` check: @@ -367,9 +472,16 @@ Changes in existing checks - Improved :doc:`misc-const-correctness <clang-tidy/checks/misc/const-correctness>` check to avoid false - positives when pointers is transferred to non-const references + positives when pointers is transferred to non-const references and avoid false positives of function pointer and fix false - positives on return of non-const pointer. + positives on return of non-const pointer and fix false positives on + pointer-to-member operator and avoid false positives when the address + of a variable is taken to be passed to a function. + +- Improved :doc:`misc-coroutine-hostile-raii + <clang-tidy/checks/misc/coroutine-hostile-raii>` check by adding the option + `AllowedCallees`, that allows exempting safely awaitable callees from the + check. - Improved :doc:`misc-header-include-cycle <clang-tidy/checks/misc/header-include-cycle>` check performance. @@ -414,7 +526,8 @@ Changes in existing checks - Improved :doc:`modernize-use-std-print <clang-tidy/checks/modernize/use-std-print>` check to correctly match when the format string is converted to a different type by an implicit - constructor call. + constructor call, and fixed a crash when handling format strings + containing non-ASCII characters. - Improved :doc:`performance-unnecessary-copy-initialization <clang-tidy/checks/performance/unnecessary-copy-initialization>` by printing @@ -434,12 +547,21 @@ Changes in existing checks comparisons to ``npos``. Internal changes may cause new rare false positives in non-standard containers. +- Improved :doc:`readability-container-data-pointer + <clang-tidy/checks/readability/container-data-pointer>` check by correctly + adding parentheses when the container expression is a dereference. + - Improved :doc:`readability-container-size-empty <clang-tidy/checks/readability/container-size-empty>` check by correctly generating fix-it hints when size method is called from implicit ``this``, ignoring default constructors with user provided arguments and adding detection in container's method except ``empty``. +- Improved :doc:`readability-duplicate-include + <clang-tidy/checks/readability/duplicate-include>` check by adding + the ``IgnoredFilesList`` option (semicolon-separated list of regexes or + filenames) to allow intentional duplicates. + - Improved :doc:`readability-identifier-naming <clang-tidy/checks/readability/identifier-naming>` check by ignoring declarations and macros in system headers. The documentation is also improved @@ -451,14 +573,32 @@ Changes in existing checks adding parentheses when the inner expression are implicitly converted multiple times. +- Improved :doc:`readability-inconsistent-declaration-parameter-name + <clang-tidy/checks/readability/inconsistent-declaration-parameter-name>` check + by not enforcing parameter name consistency between a variadic parameter pack + in the primary template and specific parameters in its specializations. + - Improved :doc:`readability-qualified-auto <clang-tidy/checks/readability/qualified-auto>` check by adding the option `IgnoreAliasing`, that allows not looking at underlying types of type aliases. +- Improved :doc:`readability-redundant-casting + <clang-tidy/checks/readability/redundant-casting>` check by fixing false + negatives when explicitly cast from function pointer. + - Improved :doc:`readability-uppercase-literal-suffix <clang-tidy/checks/readability/uppercase-literal-suffix>` check to recognize literal suffixes added in C++23 and C23. +- Improved :doc:`readability-use-concise-preprocessor-directives + <clang-tidy/checks/readability/use-concise-preprocessor-directives>` check to + generate correct fix-its for forms without a space after the directive. + +- Improved :doc:`readability-use-std-min-max + <clang-tidy/checks/readability/use-std-min-max>` check by ensuring that + comments between the ``if`` condition and the ``then`` block are preserved + when applying the fix. + Removed checks ^^^^^^^^^^^^^^ |
