2016-07-19 02:08:59 +08:00
|
|
|
===================================================
|
|
|
|
Extra Clang Tools 4.0.0 (In-Progress) Release Notes
|
|
|
|
===================================================
|
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::
|
|
|
|
|
2016-07-19 02:08:59 +08:00
|
|
|
These are in-progress notes for the upcoming Clang 4.0.0 release. You may
|
2016-03-27 13:06:57 +08:00
|
|
|
prefer the `Clang 3.8 Release Notes
|
|
|
|
<http://llvm.org/releases/3.8.0/tools/clang/docs/ReleaseNotes.html>`_.
|
|
|
|
|
|
|
|
Introduction
|
|
|
|
============
|
|
|
|
|
|
|
|
This document contains the release notes for the Extra Clang Tools, part of the
|
2016-07-19 02:08:59 +08:00
|
|
|
Clang release 4.0.0. Here we describe the status of the Extra Clang Tools in some
|
2016-03-27 13:06:57 +08:00
|
|
|
detail, including major improvements from the previous release and new feature
|
2016-09-03 04:39:46 +08:00
|
|
|
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/>`_.
|
|
|
|
|
2016-07-19 02:08:59 +08:00
|
|
|
What's New in Extra Clang Tools 4.0.0?
|
|
|
|
======================================
|
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
|
|
|
|
2016-08-11 06:00:49 +08:00
|
|
|
- Emacs integration was added.
|
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
|
|
|
|
2016-07-22 21:45:00 +08:00
|
|
|
- New `cppcoreguidelines-slicing
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines-slicing.html>`_ check
|
|
|
|
|
|
|
|
Flags slicing of member variables or vtable.
|
2016-03-27 13:06:57 +08:00
|
|
|
|
2016-07-30 16:58:54 +08:00
|
|
|
- New `cppcoreguidelines-special-member-functions
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines-special-member-functions.html>`_ check
|
|
|
|
|
|
|
|
Flags classes where some, but not all, special member functions are user-defined.
|
|
|
|
|
[clang-tidy] Add check 'misc-move-forwarding-reference'
Summary:
The check emits a warning if std::move() is applied to a forwarding reference, i.e. an rvalue reference of a function template argument type.
If a developer is unaware of the special rules for template argument deduction on forwarding references, it will seem reasonable to apply std::move() to the forwarding reference, in the same way that this would be done for a "normal" rvalue reference.
This has a consequence that is usually unwanted and possibly surprising: If the function that takes the forwarding reference as its parameter is called with an lvalue, that lvalue will be moved from (and hence placed into an indeterminate state) even though no std::move() was applied to the lvalue at the callsite.
As a fix, the check will suggest replacing the std::move() with a std::forward().
This patch requires D23004 to be submitted before it.
Reviewers: sbenza, aaron.ballman
Subscribers: klimek, etienneb, alexfh, aaron.ballman, Prazek, Eugene.Zelenko, mgehre, cfe-commits
Projects: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D22220
llvm-svn: 280077
2016-08-30 20:11:12 +08:00
|
|
|
- New `misc-move-forwarding-reference
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/misc-move-forwarding-reference.html>`_ check
|
|
|
|
|
2016-08-31 01:47:07 +08:00
|
|
|
Warns when ``std::move`` is applied to a forwarding reference instead of
|
|
|
|
``std::forward``.
|
[clang-tidy] Add check 'misc-move-forwarding-reference'
Summary:
The check emits a warning if std::move() is applied to a forwarding reference, i.e. an rvalue reference of a function template argument type.
If a developer is unaware of the special rules for template argument deduction on forwarding references, it will seem reasonable to apply std::move() to the forwarding reference, in the same way that this would be done for a "normal" rvalue reference.
This has a consequence that is usually unwanted and possibly surprising: If the function that takes the forwarding reference as its parameter is called with an lvalue, that lvalue will be moved from (and hence placed into an indeterminate state) even though no std::move() was applied to the lvalue at the callsite.
As a fix, the check will suggest replacing the std::move() with a std::forward().
This patch requires D23004 to be submitted before it.
Reviewers: sbenza, aaron.ballman
Subscribers: klimek, etienneb, alexfh, aaron.ballman, Prazek, Eugene.Zelenko, mgehre, cfe-commits
Projects: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D22220
llvm-svn: 280077
2016-08-30 20:11:12 +08:00
|
|
|
|
2016-08-13 03:30:31 +08:00
|
|
|
- New `mpi-buffer-deref
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/mpi-buffer-deref.html>`_ check
|
|
|
|
|
|
|
|
Flags buffers which are insufficiently dereferenced when passed to an MPI function call.
|
|
|
|
|
|
|
|
- New `mpi-type-mismatch
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/mpi-type-mismatch.html>`_ check
|
|
|
|
|
|
|
|
Flags MPI function calls with a buffer type and MPI data type mismatch.
|
|
|
|
|
2016-08-04 07:06:03 +08:00
|
|
|
- New `performance-inefficient-string-concatenation
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/performance-inefficient-string-concatenation.html>`_ check
|
|
|
|
|
2016-08-11 02:15:51 +08:00
|
|
|
Warns about the performance overhead arising from concatenating strings using
|
|
|
|
the ``operator+``, instead of ``operator+=``.
|
2016-08-04 07:06:03 +08:00
|
|
|
|
2016-08-23 18:09:08 +08:00
|
|
|
- New `readability-non-const-parameter
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/readability-non-const-parameter.html>`_ check
|
|
|
|
|
|
|
|
Flags function parameters of a pointer type that could be changed to point to
|
|
|
|
a constant type instead.
|
|
|
|
|
2016-08-31 08:06:55 +08:00
|
|
|
Fixed bugs:
|
2016-08-31 21:17:48 +08:00
|
|
|
|
2016-08-31 08:06:55 +08:00
|
|
|
- `modernize-make-unique
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/modernize-make-unique.html>`_
|
|
|
|
and `modernize-make-shared
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/modernize-make-shared.html>`_
|
|
|
|
Calling ``make_{unique|shared}`` from within a member function of a type
|
|
|
|
with a private or protected constructor would be ill-formed.
|
|
|
|
|
2016-07-22 08:34:42 +08:00
|
|
|
Improvements to include-fixer
|
|
|
|
-----------------------------
|
2016-03-30 20:05:33 +08:00
|
|
|
|
2016-08-18 07:36:22 +08:00
|
|
|
- Emacs integration was added.
|
2016-03-30 20:05:33 +08:00
|
|
|
|
|
|
|
Improvements to modularize
|
|
|
|
--------------------------
|
2016-03-27 13:06:57 +08:00
|
|
|
|
|
|
|
The improvements are...
|