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-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-01 03:15:49 +08:00
|
|
|
- New `bugprone-throw-keyword-missing
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/bugprone-throw-keyword-missing.html>`_ 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-19 21:02:32 +08:00
|
|
|
- New `bugprone-unused-return-value
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/bugprone-unused-return-value.html>`_ check
|
|
|
|
|
|
|
|
Warns on unused function return values.
|
|
|
|
|
[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
|
|
|
- New `cppcoreguidelines-avoid-goto
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines-avoid-goto.html>`_ check
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
- New `fuchsia-multiple-inheritance
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/fuchsia-multiple-inheritance.html>`_ check
|
|
|
|
|
|
|
|
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-09 18:47:14 +08:00
|
|
|
- New `abseil` module for checks related to the `Abseil <https://abseil.io>`_
|
|
|
|
library.
|
|
|
|
|
|
|
|
- New `abseil-string-find-startswith
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/abseil-string-find-startswith.html>`_ check
|
|
|
|
|
|
|
|
Checks whether a ``std::string::find()`` result is compared with 0, and
|
|
|
|
suggests replacing with ``absl::StartsWith()``.
|
|
|
|
|
2018-01-12 05:17:43 +08:00
|
|
|
- New `fuchsia-statically-constructed-objects
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/fuchsia-statically-constructed-objects.html>`_ check
|
|
|
|
|
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-01-18 05:18:15 +08:00
|
|
|
- New `fuchsia-trailing-return
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/fuchsia-trailing-return.html>`_ check
|
|
|
|
|
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-21 23:34:15 +08:00
|
|
|
- New `hicpp-multiway-paths-covered
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/hicpp-multiway-paths-covered.html>`_ check
|
|
|
|
|
|
|
|
Checks on ``switch`` and ``if`` - ``else if`` constructs that do not cover all possible code paths.
|
|
|
|
|
2018-03-01 03:15:49 +08:00
|
|
|
- New `modernize-use-uncaught-exceptions
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/modernize-use-uncaught-exceptions.html>`_ check
|
|
|
|
|
|
|
|
Finds and replaces deprecated uses of ``std::uncaught_exception`` to
|
|
|
|
``std::uncaught_exceptions``.
|
|
|
|
|
2018-03-08 00:57:42 +08:00
|
|
|
- New `portability-simd-intrinsics
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/portability-simd-intrinsics.html>`_ 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-15 16:27:42 +08:00
|
|
|
- New `zircon-temporary-objects
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/zircon-temporary-objects.html>`_ check
|
|
|
|
|
|
|
|
Warns on construction of specific temporary objects in the Zircon kernel.
|
|
|
|
|
[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
|
|
|
- New alias `hicpp-avoid-goto
|
2018-03-01 07:30:29 +08:00
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/hicpp-avoid-goto.html>`_ to
|
[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
|
|
|
`cppcoreguidelines-avoid-goto <http://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines-avoid-goto.html>`_
|
|
|
|
added.
|
|
|
|
|
2018-03-01 03:15:49 +08:00
|
|
|
- The 'misc-forwarding-reference-overload' check was renamed to `bugprone-forwarding-reference-overload
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/bugprone-forwarding-reference-overload.html>`_
|
2018-02-15 17:08:51 +08:00
|
|
|
|
2018-03-01 03:15:49 +08:00
|
|
|
- The 'misc-incorrect-roundings' check was renamed to `bugprone-incorrect-roundings
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/bugprone-incorrect-roundings.html>`_
|
2018-02-15 17:08:51 +08:00
|
|
|
|
2018-03-01 03:15:49 +08:00
|
|
|
- The 'misc-lambda-function-name' check was renamed to `bugprone-lambda-function-name
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/bugprone-lambda-function-name.html>`_
|
|
|
|
|
2018-03-15 16:25:39 +08:00
|
|
|
- The 'misc-macro-parentheses' check was renamed to `bugprone-macro-parentheses
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/bugprone-macro-parentheses.html>`_
|
|
|
|
|
2018-03-01 03:15:49 +08:00
|
|
|
- The 'misc-macro-repeated-side-effects' check was renamed to `bugprone-macro-repeated-side-effects
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/bugprone-macro-repeated-side-effects.html>`_
|
2018-02-20 18:48:38 +08:00
|
|
|
|
2018-03-01 03:15:49 +08:00
|
|
|
- The 'misc-misplaced-widening-cast' check was renamed to `bugprone-misplaced-widening-cast
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/bugprone-misplaced-widening-cast.html>`_
|
|
|
|
|
2018-03-15 16:26:47 +08:00
|
|
|
- The 'misc-sizeof-container' check was renamed to `bugprone-sizeof-container
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/bugprone-sizeof-container.html>`_
|
|
|
|
|
2018-03-15 16:26:19 +08:00
|
|
|
- The 'misc-sizeof-expression' check was renamed to `bugprone-sizeof-expression
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/bugprone-sizeof-expression.html>`_
|
|
|
|
|
2018-03-01 03:15:49 +08:00
|
|
|
- The 'misc-string-compare' check was renamed to `readability-string-compare
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/readability-string-compare.html>`_
|
2018-02-20 18:48:38 +08:00
|
|
|
|
2018-03-01 07:30:29 +08:00
|
|
|
- The 'misc-string-integer-assignment' check was renamed to `bugprone-string-integer-assignment
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/bugprone-string-integer-assignment.html>`_
|
|
|
|
|
|
|
|
- The 'misc-string-literal-with-embedded-nul' check was renamed to `bugprone-string-literal-with-embedded-nul
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/bugprone-string-literal-with-embedded-nul.html>`_
|
|
|
|
|
|
|
|
- The 'misc-suspicious-enum-usage' check was renamed to `bugprone-suspicious-enum-usage
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/bugprone-suspicious-enum-usage.html>`_
|
|
|
|
|
|
|
|
- The 'misc-suspicious-missing-comma' check was renamed to `bugprone-suspicious-missing-comma
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/bugprone-suspicious-missing-comma.html>`_
|
|
|
|
|
2018-03-01 07:47:15 +08:00
|
|
|
- The 'misc-suspicious-semicolon' check was renamed to `bugprone-suspicious-semicolon
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/bugprone-suspicious-semicolon.html>`_
|
|
|
|
|
|
|
|
- The 'misc-suspicious-string-compare' check was renamed to `bugprone-suspicious-string-compare
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/bugprone-suspicious-string-compare.html>`_
|
|
|
|
|
|
|
|
- The 'misc-swapped-arguments' check was renamed to `bugprone-swapped-arguments
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/bugprone-swapped-arguments.html>`_
|
|
|
|
|
|
|
|
- The 'misc-undelegated-constructor' check was renamed to `bugprone-undelegated-constructor
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/bugprone-undelegated-constructor.html>`_
|
|
|
|
|
2018-03-15 16:27:42 +08:00
|
|
|
- The 'misc-unused-raii' check was renamed to `bugprone-unused-raii
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/bugprone-unused-raii.html>`_
|
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...
|