Extra Clang Tools 24.0.0git (In-Progress) Release Notes

Written by the LLVM Team

Warning

These are in-progress notes for the upcoming Extra Clang Tools 24 release. Release notes for previous releases can be found on the Download Page.

Introduction

This document contains the release notes for the Extra Clang Tools, part of the Clang release 24.0.0git. 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 24.0.0git?

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

Potentially Breaking Changes

  • The deprecated zircon clang-tidy module has been removed. Users of zircon-temporary-objects should migrate to fuchsia-temporary-objects.

  • In 22nd release, The clang-tidy/ClangTidyModuleRegistry.h header was deprecated. All of the symbols it used to define were moved into clang-tidy/ClangTidyModule.h. The deprecated header has been removed in this release.

Improvements to clangd

Inlay hints

Diagnostics

Semantic Highlighting

Compile flags

Hover

Code completion

Code actions

  • clangd now applies clang-tidy fix-it post-processing before exposing fixes.

Signature help

Cross-references

Objective-C

Miscellaneous

Improvements to clang-doc

Improvements to clang-query

Improvements to clang-tidy

  • Improved check_clang_tidy.py by adding support of -std=cXX-or-earlier values, mirroring the existing -std=cXX-or-later. New construct expands to the given standard and every earlier one.

New checks

New check aliases

Changes in existing checks

  • Fixed a crash in bugprone-misplaced-operator-in-strlen-in-alloc when checking an array new expression without a size expression.

  • Fixed a crash in bugprone-std-namespace-modification when checking lambda closure types used as template arguments.

  • Improved cppcoreguidelines-pro-type-member-init check by treating std::array the same as built-in arrays when IgnoreArrays option is enabled.

  • Improved cppcoreguidelines-use-enum-class check by omitting unnamed enums from the enum class requirement, as previously the check suggested users an ill-formed fix.

  • Improved misc-const-correctness check:

    • Fixed false positives when the pointee is written through a pointer that is incremented, decremented or adjusted with += or -=, such as *p++ = 0.

    • Fixed false positives when the pointee is written through a pointer assignment, such as *(p = q) = 0.

  • Improved misc-redundant-expression by fixing false positives in nested expressions involving different macros or a mix of macro and non-macro operands.

  • Improved modernize-return-braced-init-list check to no longer rewrite the return value when the constructed type has a std::initializer_list constructor, as the braced form could select a different constructor.

  • Improved performance-inefficient-algorithm check by copying the searched-for value as written rather than stripping its parentheses, which could produce an invalid fix such as s.find() when the value came from a macro. No fix is offered when the value covers only part of a macro expansion.

  • Improved readability-enum-initial-value check by adding the AllowReferencedInitialValues to support the INT09-C-EX1 exception, allowing enumerators initialized by referencing another enumerator in the same enum (e.g., last = first).

  • Improved readability-identifier-naming check:

  • Improved readability-named-parameter check by ignoring standard tag types (e.g. std::in_place_t, std::allocator_arg_t, std::nothrow_t, iterator tags, lock tags, etc.) that are used exclusively for overload resolution. Added the IgnoredTypes option to allow customizing the set of ignored types.

  • Improved readability-use-std-min-max check by fixing spurious trailing semicolons and lost comments when the if body has no braces.

Removed checks

Miscellaneous

Improvements to include-fixer

Improvements to clang-include-fixer

Improvements to modularize

Improvements to pp-trace

Clang-tidy Visual Studio plugin