Extra Clang Tools 18.0.0git Release Notes

Written by the LLVM Team

Warning

These are in-progress notes for the upcoming Extra Clang Tools 18 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 18.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 18.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

Improvements to clangd

Inlay hints

Diagnostics

Semantic Highlighting

Compile flags

Hover

Code completion

Code actions

  • The extract variable tweak gained support for extracting lambda expressions to a variable.

  • A new tweak was added for turning unscoped into scoped enums.

Signature help

Cross-references

Objective-C

Miscellaneous

Improvements to clang-doc

Improvements to clang-query

The improvements are…

Improvements to clang-rename

The improvements are…

Improvements to clang-tidy

  • Preprocessor-level module header parsing is now disabled by default due to the problems it caused in C++20 and above, leading to performance and code parsing issues regardless of whether modules were used or not. This change will impact only the following checks: modernize-replace-disallow-copy-and-assign-macro, bugprone-reserved-identifier, and readability-identifier-naming. Those checks will no longer see macros defined in modules. Users can still enable this functionality using the newly added command line option –enable-module-headers-parsing.

  • Remove configuration option AnalyzeTemporaryDestructors, which was deprecated since clang-tidy 16.

  • Improved –dump-config to print check options in alphabetical order.

  • Improved clang-tidy-diff.py script.
    • Return exit code 1 if any clang-tidy subprocess exits with a non-zero code or if exporting fixes fails.

    • Accept a directory as a value for -export-fixes to export individual yaml files for each compilation unit.

    • Introduce a -config-file option that forwards a configuration file to clang-tidy. Corresponds to the –config-file option in clang-tidy.

  • Improved run-clang-tidy.py script. It now accepts a directory as a value for -export-fixes to export individual yaml files for each compilation unit.

New checks

New check aliases

Changes in existing checks

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