Skip to content

Latest commit

 

History

History
212 lines (146 loc) · 6.68 KB

ReleaseNotes.rst

File metadata and controls

212 lines (146 loc) · 6.68 KB

Extra Clang Tools

Written by the LLVM Team

PreRelease

Warning

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

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

  • Improved Fix-its of some clang-tidy checks when applied with clangd.

Semantic Highlighting

Compile flags

Hover

Code completion

Signature help

Cross-references

Objective-C

Miscellaneous

Improvements to clang-doc

The improvements are...

Improvements to clang-query

The improvements are...

Improvements to clang-rename

The improvements are...

Improvements to clang-tidy

  • Added trace code to help narrow down any checks and the relevant source code that result in crashes.
  • Clang-tidy now consideres newlines as separators of single elements in the Checks section in .clang-tidy configuration files. Where previously a comma had to be used to distinguish elements in this list from each other, newline characters now also work as separators in the parsed YAML. That means it is advised to use YAML's block style initiated by the pipe character | for the Checks section in order to benefit from the easier syntax that works without commas.

New checks

  • New bugprone-shared-ptr-array-mismatch <clang-tidy/checks/bugprone-shared-ptr-array-mismatch> check.

    Finds initializations of C++ shared pointers to non-array type that are initialized with an array.

  • New bugprone-unchecked-optional-access <clang-tidy/checks/bugprone-unchecked-optional-access> check.

    Warns when the code is unwrapping a std::optional<T>, absl::optional<T>, or base::Optional<T> object without assuring that it contains a value.

  • New modernize-macro-to-enum <clang-tidy/checks/modernize-macro-to-enum> check.

    Replaces groups of adjacent macros with an unscoped anonymous enum.

  • New portability-std-allocator-const <clang-tidy/checks/portability-std-allocator-const> check.

    Report use of std::vector<const T> (and similar containers of const elements). These are not allowed in standard C++ due to undefined std::allocator<const T>. They do not compile with libstdc++ or MSVC. Future libc++ will remove the extension (D120996 <https://reviews.llvm.org/D120996>).

New check aliases

  • New alias cppcoreguidelines-macro-to-enum <clang-tidy/checks/cppcoreguidelines-macro-to-enum> to modernize-macro-to-enum <clang-tidy/checks/modernize-macro-to-enum> was added.

Changes in existing checks

  • Fixed nonsensical suggestion of altera-struct-pack-align <clang-tidy/checks/altera-struct-pack-align> check for empty structs.
  • Fixed some false positives in bugprone-infinite-loop <clang-tidy/checks/bugprone-infinite-loop> involving dependent expressions.
  • Fixed a crash in bugprone-sizeof-expression <clang-tidy/checks/bugprone-sizeof-expression> when sizeof(...) is compared against a __int128_t.
  • Improved cppcoreguidelines-prefer-member-initializer <clang-tidy/checks/cppcoreguidelines-prefer-member-initializer> check.

    Fixed an issue when there was already an initializer in the constructor and the check would try to create another initializer for the same member.

  • Fixed a crash in llvmlibc-callee-namespace <clang-tidy/checks/llvmlibc-callee-namespace> when executing for C++ code that contain calls to advanced constructs, e.g. overloaded operators.
  • Fixed a false positive in misc-redundant-expression <clang-tidy/checks/misc-redundant-expression> involving overloaded comparison operators.
  • Fixed a false positive in misc-redundant-expression <clang-tidy/checks/misc-redundant-expression> involving assignments in conditions. This fixes Issue 35853.
  • Improved performance-inefficient-vector-operation <clang-tidy/checks/performance-inefficient-vector-operation> to work when the vector is a member of a structure.
  • Fixed a crash in readability-const-return-type <clang-tidy/checks/readability-const-return-type> when a pure virtual function overrided has a const return type. Removed the fix for a virtual function.
  • Fixed incorrect suggestions for readability-container-size-empty <clang-tidy/checks/readability-container-size-empty> when smart pointers are involved.
  • Fixed a false positive in readability-non-const-parameter <clang-tidy/checks/readability-non-const-parameter> when the parameter is referenced by an lvalue.

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

The improvements are...

Clang-tidy Visual Studio plugin