2016-07-19 02:08:59 +08:00
|
|
|
===================================================
|
2018-01-03 23:53:24 +08:00
|
|
|
Extra Clang Tools 7.0.0 (In-Progress) Release Notes
|
2016-07-19 02:08:59 +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
|
|
|
|
|
|
|
Written by the `LLVM Team <http://llvm.org/>`_
|
|
|
|
|
|
|
|
.. warning::
|
|
|
|
|
2018-01-03 23:53:24 +08:00
|
|
|
These are in-progress notes for the upcoming Extra Clang Tools 7 release.
|
2017-02-10 07:25:52 +08:00
|
|
|
Release notes for previous releases can be found on
|
|
|
|
`the Download Page <http://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
|
2018-01-03 23:53:24 +08:00
|
|
|
Clang release 7.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
|
2016-03-27 13:06:57 +08:00
|
|
|
site <http://llvm.org/releases/>`_.
|
|
|
|
|
|
|
|
For more information about Clang or LLVM, including information about
|
|
|
|
the latest release, please see the `Clang Web Site <http://clang.llvm.org>`_ or
|
|
|
|
the `LLVM Web Site <http://llvm.org>`_.
|
|
|
|
|
|
|
|
Note that if you are reading this file from a Subversion 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 <http://llvm.org/releases/>`_.
|
|
|
|
|
2018-01-03 23:53:24 +08:00
|
|
|
What's New in Extra Clang Tools 7.0.0?
|
2016-07-19 02:08:59 +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
|
|
|
|
2016-03-30 20:05:33 +08:00
|
|
|
Improvements to clang-query
|
|
|
|
---------------------------
|
2016-03-27 13:06:57 +08:00
|
|
|
|
|
|
|
The improvements are...
|
|
|
|
|
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
|
|
|
|
2018-03-22 01:06:13 +08:00
|
|
|
- New module `abseil` for checks related to the `Abseil <https://abseil.io>`_
|
|
|
|
library.
|
|
|
|
|
2018-03-08 00:57:42 +08:00
|
|
|
- New module ``portability``.
|
|
|
|
|
2018-03-15 07:47:50 +08:00
|
|
|
- New module ``zircon`` for checks related to Fuchsia's Zircon kernel.
|
|
|
|
|
2018-03-22 01:06:13 +08:00
|
|
|
- New :doc:`bugprone-throw-keyword-missing
|
|
|
|
<clang-tidy/checks/bugprone-throw-keyword-missing>` check
|
2018-01-30 23:12:24 +08:00
|
|
|
|
2018-03-01 03:15:49 +08:00
|
|
|
Diagnoses when a temporary object that appears to be an exception is
|
|
|
|
constructed but not thrown.
|
2018-01-30 22:55:50 +08:00
|
|
|
|
2018-03-22 01:06:13 +08:00
|
|
|
- New :doc:`bugprone-unused-return-value
|
|
|
|
<clang-tidy/checks/bugprone-unused-return-value>` check
|
2018-03-19 21:02:32 +08:00
|
|
|
|
|
|
|
Warns on unused function return values.
|
|
|
|
|
2018-03-22 01:06:13 +08:00
|
|
|
- New :doc:`cppcoreguidelines-avoid-goto
|
|
|
|
<clang-tidy/checks/cppcoreguidelines-avoid-goto>` check
|
[clang-tidy] implement check for goto
The usage of `goto` is discourage in C++ since forever. This check implements
a warning for every `goto`. Even though there are (rare) valid use cases for
`goto`, better high level constructs should be used.
`goto` is used sometimes in C programs to free resources at the end of
functions in the case of errors. This pattern is better implemented with
RAII in C++.
Reviewers: aaron.ballman, alexfh, hokein
Reviewed By: aaron.ballman
Subscribers: lebedev.ri, jbcoe, Eugene.Zelenko, klimek, nemanjai, mgorny, xazax.hun, kbarton, cfe-commits
Differential Revision: https://reviews.llvm.org/D41815
llvm-svn: 322626
2018-01-17 18:27:41 +08:00
|
|
|
|
|
|
|
The usage of ``goto`` for control flow is error prone and should be replaced
|
|
|
|
with looping constructs. Every backward jump is rejected. Forward jumps are
|
|
|
|
only allowed in nested loops.
|
2018-01-20 07:59:59 +08:00
|
|
|
|
2018-03-22 01:06:13 +08:00
|
|
|
- New :doc:`fuchsia-multiple-inheritance
|
|
|
|
<clang-tidy/checks/fuchsia-multiple-inheritance>` check
|
2018-01-20 07:59:59 +08:00
|
|
|
|
|
|
|
Warns if a class inherits from multiple classes that are not pure virtual.
|
[clang-tidy] implement check for goto
The usage of `goto` is discourage in C++ since forever. This check implements
a warning for every `goto`. Even though there are (rare) valid use cases for
`goto`, better high level constructs should be used.
`goto` is used sometimes in C programs to free resources at the end of
functions in the case of errors. This pattern is better implemented with
RAII in C++.
Reviewers: aaron.ballman, alexfh, hokein
Reviewed By: aaron.ballman
Subscribers: lebedev.ri, jbcoe, Eugene.Zelenko, klimek, nemanjai, mgorny, xazax.hun, kbarton, cfe-commits
Differential Revision: https://reviews.llvm.org/D41815
llvm-svn: 322626
2018-01-17 18:27:41 +08:00
|
|
|
|
2018-03-22 01:06:13 +08:00
|
|
|
- New :doc:`abseil-string-find-startswith
|
|
|
|
<clang-tidy/checks/abseil-string-find-startswith>` check
|
2018-03-09 18:47:14 +08:00
|
|
|
|
|
|
|
Checks whether a ``std::string::find()`` result is compared with 0, and
|
|
|
|
suggests replacing with ``absl::StartsWith()``.
|
|
|
|
|
2018-03-22 01:06:13 +08:00
|
|
|
- New :doc:`fuchsia-statically-constructed-objects
|
|
|
|
<clang-tidy/checks/fuchsia-statically-constructed-objects>` check
|
2018-01-12 05:17:43 +08:00
|
|
|
|
2018-03-01 03:15:49 +08:00
|
|
|
Warns if global, non-trivial objects with static storage are constructed,
|
|
|
|
unless the object is statically initialized with a ``constexpr`` constructor
|
|
|
|
or has no explicit constructor.
|
2018-03-15 16:25:39 +08:00
|
|
|
|
2018-03-22 01:06:13 +08:00
|
|
|
- New :doc:`fuchsia-trailing-return
|
|
|
|
<clang-tidy/checks/fuchsia-trailing-return>` check
|
2018-01-18 05:18:15 +08:00
|
|
|
|
2018-03-15 16:25:39 +08:00
|
|
|
Functions that have trailing returns are disallowed, except for those
|
|
|
|
using ``decltype`` specifiers and lambda with otherwise unutterable
|
2018-01-18 05:18:15 +08:00
|
|
|
return types.
|
[clang-tidy] Add `readability-simd-intrinsics` check.
Summary:
Many architectures provide SIMD operations (e.g. x86 SSE/AVX, Power AltiVec/VSX,
ARM NEON). It is common that SIMD code implementing the same algorithm, is
written in multiple target-dispatching pieces to optimize for different
architectures or micro-architectures.
The C++ standard proposal P0214 and its extensions cover many common SIMD
operations. By migrating from target-dependent intrinsics to P0214 operations,
the SIMD code can be simplified and pieces for different targets can be unified.
Refer to http://wg21.link/p0214 for introduction and motivation for the
data-parallel standard library.
Subscribers: klimek, aemerson, mgorny, xazax.hun, kristof.beyls, hintonda, cfe-commits
Differential Revision: https://reviews.llvm.org/D42983
llvm-svn: 325272
2018-02-16 01:56:43 +08:00
|
|
|
|
2018-03-22 01:06:13 +08:00
|
|
|
- New :doc:`hicpp-multiway-paths-covered
|
|
|
|
<clang-tidy/checks/hicpp-multiway-paths-covered>` check
|
2018-03-21 23:34:15 +08:00
|
|
|
|
|
|
|
Checks on ``switch`` and ``if`` - ``else if`` constructs that do not cover all possible code paths.
|
|
|
|
|
2018-03-22 01:06:13 +08:00
|
|
|
- New :doc:`modernize-use-uncaught-exceptions
|
|
|
|
<clang-tidy/checks/modernize-use-uncaught-exceptions>` check
|
2018-03-01 03:15:49 +08:00
|
|
|
|
|
|
|
Finds and replaces deprecated uses of ``std::uncaught_exception`` to
|
|
|
|
``std::uncaught_exceptions``.
|
|
|
|
|
2018-03-22 01:06:13 +08:00
|
|
|
- New :doc:`portability-simd-intrinsics
|
|
|
|
<clang-tidy/checks/portability-simd-intrinsics>` check
|
[clang-tidy] Add `readability-simd-intrinsics` check.
Summary:
Many architectures provide SIMD operations (e.g. x86 SSE/AVX, Power AltiVec/VSX,
ARM NEON). It is common that SIMD code implementing the same algorithm, is
written in multiple target-dispatching pieces to optimize for different
architectures or micro-architectures.
The C++ standard proposal P0214 and its extensions cover many common SIMD
operations. By migrating from target-dependent intrinsics to P0214 operations,
the SIMD code can be simplified and pieces for different targets can be unified.
Refer to http://wg21.link/p0214 for introduction and motivation for the
data-parallel standard library.
Subscribers: klimek, aemerson, mgorny, xazax.hun, kristof.beyls, hintonda, cfe-commits
Differential Revision: https://reviews.llvm.org/D42983
llvm-svn: 325272
2018-02-16 01:56:43 +08:00
|
|
|
|
2018-03-08 00:57:42 +08:00
|
|
|
Warns or suggests alternatives if SIMD intrinsics are used which can be replaced by
|
[clang-tidy] Add `readability-simd-intrinsics` check.
Summary:
Many architectures provide SIMD operations (e.g. x86 SSE/AVX, Power AltiVec/VSX,
ARM NEON). It is common that SIMD code implementing the same algorithm, is
written in multiple target-dispatching pieces to optimize for different
architectures or micro-architectures.
The C++ standard proposal P0214 and its extensions cover many common SIMD
operations. By migrating from target-dependent intrinsics to P0214 operations,
the SIMD code can be simplified and pieces for different targets can be unified.
Refer to http://wg21.link/p0214 for introduction and motivation for the
data-parallel standard library.
Subscribers: klimek, aemerson, mgorny, xazax.hun, kristof.beyls, hintonda, cfe-commits
Differential Revision: https://reviews.llvm.org/D42983
llvm-svn: 325272
2018-02-16 01:56:43 +08:00
|
|
|
``std::experimental::simd`` operations.
|
2018-03-01 07:30:29 +08:00
|
|
|
|
2018-03-22 01:06:13 +08:00
|
|
|
- New :doc:`zircon-temporary-objects
|
|
|
|
<clang-tidy/checks/zircon-temporary-objects>` check
|
2018-03-15 16:27:42 +08:00
|
|
|
|
|
|
|
Warns on construction of specific temporary objects in the Zircon kernel.
|
|
|
|
|
2018-03-22 01:06:13 +08:00
|
|
|
- New alias :doc:`hicpp-avoid-goto
|
|
|
|
<clang-tidy/checks/hicpp-avoid-goto>` to :doc:`cppcoreguidelines-avoid-goto
|
|
|
|
<clang-tidy/checks/cppcoreguidelines-avoid-goto>`
|
[clang-tidy] implement check for goto
The usage of `goto` is discourage in C++ since forever. This check implements
a warning for every `goto`. Even though there are (rare) valid use cases for
`goto`, better high level constructs should be used.
`goto` is used sometimes in C programs to free resources at the end of
functions in the case of errors. This pattern is better implemented with
RAII in C++.
Reviewers: aaron.ballman, alexfh, hokein
Reviewed By: aaron.ballman
Subscribers: lebedev.ri, jbcoe, Eugene.Zelenko, klimek, nemanjai, mgorny, xazax.hun, kbarton, cfe-commits
Differential Revision: https://reviews.llvm.org/D41815
llvm-svn: 322626
2018-01-17 18:27:41 +08:00
|
|
|
added.
|
|
|
|
|
2018-03-22 01:06:13 +08:00
|
|
|
- The 'misc-forwarding-reference-overload' check was renamed to :doc:`bugprone-forwarding-reference-overload
|
|
|
|
<clang-tidy/checks/bugprone-forwarding-reference-overload>`
|
2018-02-15 17:08:51 +08:00
|
|
|
|
2018-03-22 01:06:13 +08:00
|
|
|
- The 'misc-incorrect-roundings' check was renamed to :doc:`bugprone-incorrect-roundings
|
|
|
|
<clang-tidy/checks/bugprone-incorrect-roundings>`
|
2018-02-15 17:08:51 +08:00
|
|
|
|
2018-03-22 01:06:13 +08:00
|
|
|
- The 'misc-lambda-function-name' check was renamed to :doc:`bugprone-lambda-function-name
|
|
|
|
<clang-tidy/checks/bugprone-lambda-function-name>`
|
2018-03-01 03:15:49 +08:00
|
|
|
|
2018-03-22 01:06:13 +08:00
|
|
|
- The 'misc-macro-parentheses' check was renamed to :doc:`bugprone-macro-parentheses
|
|
|
|
<clang-tidy/checks/bugprone-macro-parentheses>`
|
2018-03-15 16:25:39 +08:00
|
|
|
|
2018-03-22 01:06:13 +08:00
|
|
|
- The 'misc-macro-repeated-side-effects' check was renamed to :doc:`bugprone-macro-repeated-side-effects
|
|
|
|
<clang-tidy/checks/bugprone-macro-repeated-side-effects>`
|
2018-02-20 18:48:38 +08:00
|
|
|
|
2018-03-22 01:06:13 +08:00
|
|
|
- The 'misc-misplaced-widening-cast' check was renamed to :doc:`bugprone-misplaced-widening-cast
|
|
|
|
<clang-tidy/checks/bugprone-misplaced-widening-cast>`
|
2018-03-01 03:15:49 +08:00
|
|
|
|
2018-03-22 01:06:13 +08:00
|
|
|
- The 'misc-sizeof-container' check was renamed to :doc:`bugprone-sizeof-container
|
|
|
|
<clang-tidy/checks/bugprone-sizeof-container>`
|
2018-03-15 16:26:47 +08:00
|
|
|
|
2018-03-22 01:06:13 +08:00
|
|
|
- The 'misc-sizeof-expression' check was renamed to :doc:`bugprone-sizeof-expression
|
|
|
|
<clang-tidy/checks/bugprone-sizeof-expression>`
|
2018-03-15 16:26:19 +08:00
|
|
|
|
2018-03-22 01:06:13 +08:00
|
|
|
- The 'misc-string-compare' check was renamed to :doc:`readability-string-compare
|
|
|
|
<clang-tidy/checks/readability-string-compare>`
|
2018-02-20 18:48:38 +08:00
|
|
|
|
2018-03-22 01:06:13 +08:00
|
|
|
- The 'misc-string-integer-assignment' check was renamed to :doc:`bugprone-string-integer-assignment
|
|
|
|
<clang-tidy/checks/bugprone-string-integer-assignment>`
|
2018-03-01 07:30:29 +08:00
|
|
|
|
2018-03-22 01:06:13 +08:00
|
|
|
- The 'misc-string-literal-with-embedded-nul' check was renamed to :doc:`bugprone-string-literal-with-embedded-nul
|
|
|
|
<clang-tidy/checks/bugprone-string-literal-with-embedded-nul>`
|
2018-03-01 07:30:29 +08:00
|
|
|
|
2018-03-22 01:06:13 +08:00
|
|
|
- The 'misc-suspicious-enum-usage' check was renamed to :doc:`bugprone-suspicious-enum-usage
|
|
|
|
<clang-tidy/checks/bugprone-suspicious-enum-usage>`
|
2018-03-01 07:30:29 +08:00
|
|
|
|
2018-03-22 01:06:13 +08:00
|
|
|
- The 'misc-suspicious-missing-comma' check was renamed to :doc:`bugprone-suspicious-missing-comma
|
|
|
|
<clang-tidy/checks/bugprone-suspicious-missing-comma>`
|
2018-03-01 07:30:29 +08:00
|
|
|
|
2018-03-22 01:06:13 +08:00
|
|
|
- The 'misc-suspicious-semicolon' check was renamed to :doc:`bugprone-suspicious-semicolon
|
|
|
|
<clang-tidy/checks/bugprone-suspicious-semicolon>`
|
2018-03-01 07:47:15 +08:00
|
|
|
|
2018-03-22 01:06:13 +08:00
|
|
|
- The 'misc-suspicious-string-compare' check was renamed to :doc:`bugprone-suspicious-string-compare
|
|
|
|
<clang-tidy/checks/bugprone-suspicious-string-compare>`
|
2018-03-01 07:47:15 +08:00
|
|
|
|
2018-03-22 01:06:13 +08:00
|
|
|
- The 'misc-swapped-arguments' check was renamed to :doc:`bugprone-swapped-arguments
|
|
|
|
<clang-tidy/checks/bugprone-swapped-arguments>`
|
2018-03-01 07:47:15 +08:00
|
|
|
|
2018-03-22 01:06:13 +08:00
|
|
|
- The 'misc-undelegated-constructor' check was renamed to :doc:`bugprone-undelegated-constructor
|
|
|
|
<clang-tidy/checks/bugprone-undelegated-constructor>`
|
2018-03-01 07:47:15 +08:00
|
|
|
|
2018-03-22 01:06:13 +08:00
|
|
|
- The 'misc-unused-raii' check was renamed to :doc:`bugprone-unused-raii
|
|
|
|
<clang-tidy/checks/bugprone-unused-raii>`
|
2018-03-15 07:47:50 +08:00
|
|
|
|
2016-07-22 08:34:42 +08:00
|
|
|
Improvements to include-fixer
|
|
|
|
-----------------------------
|
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...
|