Extra Clang Tools 20.1.8 Release Notes

Written by the LLVM Team

Introduction

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

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

  • The clang-pseudo tool is incomplete and does not have active maintainers, so it has been removed. See the RFC for more details.

Improvements to clangd

Inlay hints

  • Added support for inlay hints for default arguments, enabled using the DefaultArguments config option (#GH95712)

Diagnostics

Semantic Highlighting

Compile flags

  • Fixed a bug where clangd would unnecessarily reparse open files whose compile command did not change when receiving a new compile command via an LSP workspace/configuration request (#GH115438)

Hover

  • Hovering over a function name now shows the function’s documentation comment even if the comment is written above the function’s out-of-line definition in a different source file (#GH67802)

Code completion

  • Added an ArgumentLists config option under Completion. This is a more flexible version of the –function-arg-placeholders command line flag, allowing users more detailed control of what is inserted in argument list position when clangd completes the name of a function in a function call context. (#GH111322)

  • Clangd now supports configuring which headers should be inserted using <> vs. “” syntax using the QuotedHeaders and AngledHeaders config options under Style (#GH67749)

  • Added completion for C++20 keywords.

  • Improved code completion behaviour in dependent/templated code

  • Completion items now include documentation comments in more cases (#GH120099)

Code actions

  • Added Swap operands tweak for certain binary operators.

  • Improved the extract-to-function code action to allow extracting statements with overloaded operators like << of std::ostream.

  • Define outline now handles member functions of class templates, and member function templates.

  • Extract variable can now operate on the top-level expression in an expression statement (#GH112525)

Signature help

Cross-references

  • Clangd now supports the “outgoing calls” direction of call hierarchy (#GH77556)

  • Call hierarchy can now be invoked on fields and namespace-scope variables (#GH113900)

  • Improved heuristics for filtering out generated Protobuf symbol names during indexing (#GH110091)

  • Compiler intrinsics defined in *intrin.h system headers are now indexed even if they have reserved names (#GH119735)

  • Various improvements to go-to-definition in templated code

Objective-C

Clang-tidy integration

  • Improved robustness in handling clang-tidy check names (#GH109421)

C++20 Modules Support

  • Support code completion for symbols defined in modules (#GH110083)

  • Improve performance when opening files that import modules (#GH106683)

  • Compile commands for modules now respect modifications specified in .clangd files (#GH122606)

Miscellaneous

  • Fixed an OOM affecting some versions of libcxx headers compiled in C++20 mode (#GH108866)

  • Various other stability improvements, e.g. crash fixes

Improvements to clang-doc

Improvements to clang-query

  • Added set enable-profile true/false command for basic matcher profiling.

Improvements to clang-tidy

  • Improved clang-tidy-diff.py script. Add the -only-check-in-db option to exclude files not present in the compilation database, avoiding false-negative results.

  • Improved run-clang-tidy.py script. Fixed minor shutdown noise happening on certain platforms when interrupting the script.

  • Improved clang-tidy:

    • add support for –verify-config flag to check the configuration options of the Clang Static Analyzer Checks.

    • accept parameters file in command line.

    • fix incorrect configuration file path resolving when file paths contain ...

    • remove global options for most of checks. All options are changed to local options except IncludeStyle, StrictMode and IgnoreMacros. Global scoped StrictMode and IgnoreMacros are deprecated and will be removed in further releases.

Check

Options removed from global option

bugprone-reserved-identifier

AggressiveDependentMemberLookup

bugprone-unchecked-optional-access

IgnoreSmartPointerDereference

cppcoreguidelines-pro-type-member-init

UseAssignment

cppcoreguidelines-rvalue-reference-param-not-moved

AllowPartialMove; IgnoreUnnamedParams; IgnoreNonDeducedTemplateTypes

misc-include-cleaner

IgnoreHeaders; DeduplicateFindings

performance-inefficient-vector-operation

EnableProto

readability-identifier-naming

AggressiveDependentMemberLookup

readability-inconsistent-declaration-parameter-name

Strict

readability-redundant-access-specifiers

CheckFirstDeclaration

readability-redundant-casting

IgnoreTypeAliases

  • Fixed bug in clang-tidy by which HeaderFilterRegex did not take effect when passed via the .clang-tidy file.

  • Fixed bug in run_clang_tidy.py where the program would not correctly display the checks enabled by the top-level .clang-tidy file.

New checks

New check aliases

Changes in existing checks

Removed checks

Miscellaneous

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