2019-07-18 19:51:05 +08:00
|
|
|
====================================================
|
2021-01-27 11:37:08 +08:00
|
|
|
Extra Clang Tools 13.0.0 (In-Progress) Release Notes
|
2019-07-18 19:51:05 +08:00
|
|
|
====================================================
|
2016-03-27 13:06:57 +08:00
|
|
|
|
|
|
|
.. contents::
|
|
|
|
:local:
|
2016-03-30 20:05:33 +08:00
|
|
|
:depth: 3
|
2016-03-27 13:06:57 +08:00
|
|
|
|
2018-09-10 16:52:04 +08:00
|
|
|
Written by the `LLVM Team <https://llvm.org/>`_
|
2016-03-27 13:06:57 +08:00
|
|
|
|
|
|
|
.. warning::
|
|
|
|
|
2021-01-27 11:37:08 +08:00
|
|
|
These are in-progress notes for the upcoming Extra Clang Tools 13 release.
|
2017-02-10 07:25:52 +08:00
|
|
|
Release notes for previous releases can be found on
|
2018-09-10 16:52:04 +08:00
|
|
|
`the Download Page <https://releases.llvm.org/download.html>`_.
|
2016-03-27 13:06:57 +08:00
|
|
|
|
|
|
|
Introduction
|
|
|
|
============
|
|
|
|
|
|
|
|
This document contains the release notes for the Extra Clang Tools, part of the
|
2021-01-27 11:37:08 +08:00
|
|
|
Clang release 13.0.0. Here we describe the status of the Extra Clang Tools in
|
2016-09-07 01:52:44 +08:00
|
|
|
some detail, including major improvements from the previous release and new
|
|
|
|
feature work. All LLVM releases may be downloaded from the `LLVM releases web
|
2018-09-10 16:52:04 +08:00
|
|
|
site <https://llvm.org/releases/>`_.
|
2016-03-27 13:06:57 +08:00
|
|
|
|
|
|
|
For more information about Clang or LLVM, including information about
|
2018-09-10 16:52:04 +08:00
|
|
|
the latest release, please see the `Clang Web Site <https://clang.llvm.org>`_ or
|
|
|
|
the `LLVM Web Site <https://llvm.org>`_.
|
2016-03-27 13:06:57 +08:00
|
|
|
|
2020-01-15 17:02:56 +08:00
|
|
|
Note that if you are reading this file from a Git checkout or the
|
2016-03-27 13:06:57 +08:00
|
|
|
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
|
2018-09-10 16:52:04 +08:00
|
|
|
see the `releases page <https://llvm.org/releases/>`_.
|
2016-03-27 13:06:57 +08:00
|
|
|
|
2021-01-27 11:37:08 +08:00
|
|
|
What's New in Extra Clang Tools 13.0.0?
|
2019-07-18 19:51:05 +08:00
|
|
|
=======================================
|
2016-03-27 13:06:57 +08:00
|
|
|
|
|
|
|
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
|
|
|
|
------------------
|
|
|
|
|
2016-07-19 02:08:59 +08:00
|
|
|
...
|
2016-03-27 13:06:57 +08:00
|
|
|
|
2018-10-12 05:40:32 +08:00
|
|
|
Improvements to clangd
|
|
|
|
----------------------
|
|
|
|
|
2021-01-27 11:37:08 +08:00
|
|
|
The improvements are...
|
2018-10-12 05:40:32 +08:00
|
|
|
|
|
|
|
Improvements to clang-doc
|
|
|
|
-------------------------
|
|
|
|
|
2020-01-15 17:02:56 +08:00
|
|
|
The improvements are...
|
2018-10-12 05:40:32 +08:00
|
|
|
|
2016-03-30 20:05:33 +08:00
|
|
|
Improvements to clang-query
|
|
|
|
---------------------------
|
2016-03-27 13:06:57 +08:00
|
|
|
|
2021-01-27 11:37:08 +08:00
|
|
|
The improvements are...
|
2016-03-27 13:06:57 +08:00
|
|
|
|
2016-03-30 20:05:33 +08:00
|
|
|
Improvements to clang-rename
|
|
|
|
----------------------------
|
2016-03-27 13:06:57 +08:00
|
|
|
|
2017-01-13 05:58:40 +08:00
|
|
|
The improvements are...
|
2016-03-27 13:06:57 +08:00
|
|
|
|
2016-03-30 20:05:33 +08:00
|
|
|
Improvements to clang-tidy
|
|
|
|
--------------------------
|
2016-03-27 13:06:57 +08:00
|
|
|
|
2021-02-23 20:38:11 +08:00
|
|
|
- The `run-clang-tidy.py` helper script is now installed in `bin/` as
|
|
|
|
`run-clang-tidy`. It was previously installed in `share/clang/`.
|
|
|
|
|
2021-03-02 06:07:09 +08:00
|
|
|
- Added command line option `--fix-notes` to apply fixes found in notes
|
|
|
|
attached to warnings. These are typically cases where we are less confident
|
|
|
|
the fix will have the desired effect.
|
|
|
|
|
2021-03-16 00:06:03 +08:00
|
|
|
- libToolingCore and Clang-Tidy was refactored and now checks can produce
|
|
|
|
highlights (`^~~~~` under fragments of the source code) in diagnostics.
|
|
|
|
Existing and new checks in the future can be expected to start implementing
|
|
|
|
this functionality.
|
|
|
|
This change only affects the visual rendering of diagnostics, and does not
|
|
|
|
alter the behavior of generated fixes.
|
|
|
|
|
2021-02-22 18:46:36 +08:00
|
|
|
New checks
|
|
|
|
^^^^^^^^^^
|
|
|
|
|
[clang-tidy] Add check for implicit widening of multiplication result
Overflows are never fun.
In most cases (in most of the code), they are rare,
because usually you e.g. don't have as many elements.
However, it's exceptionally easy to fall into this pitfail
in code that deals with images, because, assuming 4-channel 32-bit FP data,
you need *just* ~269 megapixel image to case an overflow
when computing at least the total byte count.
In [[ https://github.com/darktable-org/darktable | darktable ]], there is a *long*, painful history of dealing with such bugs:
* https://github.com/darktable-org/darktable/pull/7740
* https://github.com/darktable-org/darktable/pull/7419
* https://github.com/darktable-org/darktable/commit/eea1989f2c9fa76710db07baaec4c19c1e40e81c
* https://github.com/darktable-org/darktable/commit/70626dd95bf0fab36f2d011dab075e3ebbf7aa28
* https://github.com/darktable-org/darktable/pull/670
* https://github.com/darktable-org/darktable/commit/38c69fb1b2bc90057c569242cb9945a10be0b583
and yet they clearly keep resurfacing still.
It would be immensely helpful to have a diagnostic for those patterns,
which is what this change proposes.
Currently, i only diagnose the most obvious case, where multiplication
is directly widened with no other expressions inbetween,
(i.e. `long r = (int)a * (int)b` but not even e.g. `long r = ((int)a * (int)b)`)
however that might be worth relaxing later.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D93822
2021-04-14 02:21:19 +08:00
|
|
|
- New :doc:`bugprone-implicit-widening-of-multiplication-result
|
|
|
|
<clang-tidy/checks/bugprone-implicit-widening-of-multiplication-result>` check.
|
|
|
|
|
|
|
|
Diagnoses instances of an implicit widening of multiplication result.
|
|
|
|
|
2021-02-22 18:46:36 +08:00
|
|
|
- New :doc:`concurrency-thread-canceltype-asynchronous
|
|
|
|
<clang-tidy/checks/concurrency-thread-canceltype-asynchronous>` check.
|
|
|
|
|
|
|
|
Finds ``pthread_setcanceltype`` function calls where a thread's cancellation
|
|
|
|
type is set to asynchronous.
|
|
|
|
|
2021-05-07 05:01:39 +08:00
|
|
|
- New :doc:`altera-id-dependent-backward-branch
|
|
|
|
<clang-tidy/checks/altera-id-dependent-backward-branch>` check.
|
|
|
|
|
|
|
|
Finds ID-dependent variables and fields that are used within loops. This
|
|
|
|
causes branches to occur inside the loops, and thus leads to performance
|
|
|
|
degradation.
|
|
|
|
|
2021-03-23 01:08:14 +08:00
|
|
|
- New :doc:`altera-unroll-loops
|
|
|
|
<clang-tidy/checks/altera-unroll-loops>` check.
|
|
|
|
|
|
|
|
Finds inner loops that have not been unrolled, as well as fully unrolled
|
|
|
|
loops with unknown loops bounds or a large number of iterations.
|
|
|
|
|
2021-02-24 02:29:22 +08:00
|
|
|
- New :doc:`cppcoreguidelines-prefer-member-initializer
|
|
|
|
<clang-tidy/checks/cppcoreguidelines-prefer-member-initializer>` check.
|
|
|
|
|
|
|
|
Finds member initializations in the constructor body which can be placed into
|
|
|
|
the initialization list instead.
|
|
|
|
|
2021-04-14 14:47:08 +08:00
|
|
|
- New :doc:`bugprone-unhandled-exception-at-new
|
|
|
|
<clang-tidy/checks/bugprone-unhandled-exception-at-new>` check.
|
|
|
|
|
|
|
|
Finds calls to ``new`` with missing exception handler for ``std::bad_alloc``.
|
|
|
|
|
2021-02-22 18:46:36 +08:00
|
|
|
New check aliases
|
|
|
|
^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
- New alias :doc:`cert-pos47-c
|
|
|
|
<clang-tidy/checks/cert-pos47-c>` to
|
|
|
|
:doc:`concurrency-thread-canceltype-asynchronous
|
|
|
|
<clang-tidy/checks/concurrency-thread-canceltype-asynchronous>` was added.
|
2020-11-08 03:14:08 +08:00
|
|
|
|
2021-02-23 00:16:51 +08:00
|
|
|
Changes in existing checks
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
- Improved :doc:`bugprone-signal-handler
|
|
|
|
<clang-tidy/checks/bugprone-signal-handler>` check.
|
|
|
|
|
|
|
|
Added an option to choose the set of allowed functions.
|
|
|
|
|
2021-03-02 05:52:12 +08:00
|
|
|
- Improved :doc:`readability-uniqueptr-delete-release
|
|
|
|
<clang-tidy/checks/readability-uniqueptr-delete-release>` check.
|
|
|
|
|
|
|
|
Added an option to choose whether to refactor by calling the ``reset`` member
|
|
|
|
function or assignment to ``nullptr``.
|
|
|
|
Added support for pointers to ``std::unique_ptr``.
|
|
|
|
|
2021-03-16 22:03:29 +08:00
|
|
|
Removed checks
|
|
|
|
^^^^^^^^^^^^^^
|
2021-03-04 00:01:12 +08:00
|
|
|
|
2021-03-16 22:03:29 +08:00
|
|
|
- The readability-deleted-default check has been removed.
|
2021-03-04 00:01:12 +08:00
|
|
|
|
|
|
|
The clang warning `Wdefaulted-function-deleted
|
|
|
|
<https://clang.llvm.org/docs/DiagnosticsReference.html#wdefaulted-function-deleted>`_
|
|
|
|
will diagnose the same issues and is enabled by default.
|
|
|
|
|
2019-10-31 01:48:26 +08:00
|
|
|
Improvements to include-fixer
|
|
|
|
-----------------------------
|
|
|
|
|
|
|
|
The improvements are...
|
|
|
|
|
2019-03-25 22:09:10 +08:00
|
|
|
Improvements to clang-include-fixer
|
2019-03-26 00:50:24 +08:00
|
|
|
-----------------------------------
|
2016-03-30 20:05:33 +08:00
|
|
|
|
2017-01-13 05:58:40 +08:00
|
|
|
The improvements are...
|
2016-03-30 20:05:33 +08:00
|
|
|
|
|
|
|
Improvements to modularize
|
|
|
|
--------------------------
|
2016-03-27 13:06:57 +08:00
|
|
|
|
|
|
|
The improvements are...
|
[pp-trace] Delete -ignore and add a new option -callbacks
Summary:
-ignore specifies a list of PP callbacks to ignore. It cannot express a
whitelist, which may be more useful than a blacklist.
Add a new option -callbacks to replace it.
-ignore= (default) => -callbacks='*' (default)
-ignore=FileChanged,FileSkipped => -callbacks='*,-FileChanged,-FileSkipped'
-callbacks='Macro*' : print only MacroDefined,MacroExpands,MacroUndefined,...
Reviewers: juliehockett, aaron.ballman, alexfh, ioeric
Reviewed By: aaron.ballman
Subscribers: nemanjai, kbarton, jsji, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D59296
llvm-svn: 356366
2019-03-18 21:30:17 +08:00
|
|
|
|
|
|
|
Improvements to pp-trace
|
|
|
|
------------------------
|
|
|
|
|
2019-07-18 19:51:05 +08:00
|
|
|
The improvements are...
|
2019-08-28 02:36:08 +08:00
|
|
|
|
|
|
|
Clang-tidy visual studio plugin
|
|
|
|
-------------------------------
|