Extra Clang Tools 16.0.6 Release Notes — Extra Clang Tools 16.0.6 documentation

# Extra Clang Tools 16.0.6 documentation

## Extra Clang Tools 16.0.6 Release Notes

Written by the LLVM Team

## Introduction

This document contains the release notes for the Extra Clang Tools, part of the Clang release 16.0.6. Here we describe the status of the Extra Clang Tools in some detail, including major improvements from the previous release and new feature work. All LLVM releases may be downloaded from the LLVM releases web site.

For more information about Clang or LLVM, including information about the latest release, please see the Clang Web Site or the LLVM Web Site.

Note that if you are reading this file from a Git checkout or the main Clang web page, this document applies to the next release, not the current one. To see the release notes for a specific release, please see the releases page.

## What’s New in Extra Clang Tools 16.0.6?

Some of the major new features and improvements to Extra Clang Tools are listed here. Generic improvements to Extra Clang Tools as a whole or to its underlying infrastructure are described first, followed by tool-specific sections.

### Major New Features

…

### Improvements to clangd

#### Inlay hints

#### Diagnostics

#### Semantic Highlighting

#### Compile flags

#### Hover

#### Code completion

#### Signature help

#### Cross-references

#### Objective-C

#### Miscellaneous

### Improvements to clang-doc

- The default executor was changed to standalone to match other tools.

### Improvements to clang-query

The improvements are…

### Improvements to clang-rename

The improvements are…

### Improvements to clang-tidy

- Change to Python 3 in the shebang of add_new_check.py and rename_check.py, as the existing code is not compatible with Python 2.

- Fix a minor bug in add_new_check.py to only traverse subdirectories when updating the list of checks in the documentation.

- Deprecate the global configuration file option AnalyzeTemporaryDtors, which is no longer in use. The option will be fully removed in clang-tidy version 18.

#### New checks

- New bugprone-suspicious-realloc-usage check.

  Finds usages of `realloc` where the return value is assigned to the same expression as passed to the first argument.

- New cppcoreguidelines-avoid-const-or-ref-data-members check.

  Warns when a struct or class uses const or reference (lvalue or rvalue) data members.

- New cppcoreguidelines-avoid-do-while check.

  Warns when using `do-while` loops.

- New cppcoreguidelines-avoid-reference-coroutine-parameters check.

  Warns on coroutines that accept reference parameters.

- New misc-use-anonymous-namespace check.

  Warns when using `static` function or variables at global scope, and suggests moving them into an anonymous namespace.

- New bugprone-standalone-empty check.

  Warns when empty() is used on a range and the result is ignored. Suggests clear() if it is an existing member function.

#### New check aliases

- New alias cert-msc54-cpp to bugprone-signal-handler was added.

#### Changes in existing checks

- Fixed a false positive in bugprone-assignment-in-if-condition check when there was an assignement in a lambda found in the condition of an `if`.

- Improved bugprone-signal-handler check. Partial support for C++14 signal handler rules was added. Bug report generation was improved.

- Fixed a false positive in cppcoreguidelines-pro-type-member-init when warnings would be emitted for uninitialized members of an anonymous union despite there being an initializer for one of the other members.

- Fixed false positives in google-objc-avoid-throwing-exception check for exceptions thrown by code emitted from macros in system headers.

- Improved misc-redundant-expression check.

  The check now skips concept definitions since redundant expressions still make sense inside them.

- Improved modernize-loop-convert to check for container functions `begin`/`end` etc on base classes of the container type, instead of only as direct members of the container type itself.

- Improved modernize-use-emplace check.

  The check now supports detecting inefficient invocations of `push` and `push_front` on STL-style containers and replacing them with `emplace` or `emplace_front`.

  The check now supports detecting alias cases of `push_back` `push` and `push_front` on STL-style containers and replacing them with `emplace_back`, `emplace` or `emplace_front`.

- Improved modernize-use-equals-default check.

  The check now skips unions/union-like classes since in this case a default constructor with empty body is not equivalent to the explicitly defaulted one, variadic constructors since they cannot be explicitly defaulted. The check also skips copy assignment operators with nonstandard return types, template constructors, private/protected default constructors for C++17 or earlier. The automatic fixit has been adjusted to avoid adding superfluous semicolon. The check is restricted to C++11 or later.

- Change the default behavior of readability-avoid-const-params-in-decls to not warn about const value parameters of declarations inside macros.

- Fixed crashes in readability-braces-around-statements and readability-simplify-boolean-expr when using a C++23 `if consteval` statement.

- Change the behavior of readability-const-return-type to not warn about const return types in overridden functions since the derived class cannot always choose to change the function signature.

- Change the default behavior of readability-const-return-type to not warn about const value parameters of declarations inside macros.

- Support removing `c_str` calls from `std::string_view` constructor calls in readability-redundant-string-cstr check.

#### Removed checks

### Improvements to include-fixer

The improvements are…

### Improvements to clang-include-fixer

The improvements are…

### Improvements to modularize

The improvements are…

### Improvements to pp-trace

### Clang-tidy Visual Studio plugin