2016-07-19 02:08:59 +08:00
|
|
|
===================================================
|
2017-01-13 05:58:40 +08:00
|
|
|
Extra Clang Tools 5.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::
|
|
|
|
|
2017-01-13 05:58:40 +08:00
|
|
|
These are in-progress notes for the upcoming Extra Clang Tools 5 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
|
2017-01-13 05:58:40 +08:00
|
|
|
Clang release 5.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/>`_.
|
|
|
|
|
2017-01-13 05:58:40 +08:00
|
|
|
What's New in Extra Clang Tools 5.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
|
|
|
|
2017-05-10 19:16:55 +08:00
|
|
|
- New `cert-dcl21-cpp
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/cert-dcl21-cpp.html>`_ check
|
|
|
|
|
|
|
|
Checks if the overloaded postfix ``operator++/--`` returns a constant object.
|
|
|
|
|
2017-02-17 16:52:51 +08:00
|
|
|
- New `cert-dcl58-cpp
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/cert-dcl58-cpp.html>`_ check
|
|
|
|
|
|
|
|
Finds modification of the ``std`` or ``posix`` namespace.
|
|
|
|
|
2017-04-18 15:46:39 +08:00
|
|
|
- Improved `cppcoreguidelines-no-malloc
|
[clang-tidy] Function names configurable for cppcoreguidelines-nomalloc - checker
Summary:
Hello everybody,
this is an incremental patch for the NoMalloc-Checker I wrote. It allows to configure the memory-management functions, that are checked,
This might be helpful for a code base with custom functions in use, or non-standard functionality, like posix_memalign.
Reviewers: aaron.ballman, hokein, alexfh
Reviewed By: aaron.ballman, alexfh
Subscribers: sbenza, nemanjai, JDevlieghere
Tags: #clang-tools-extra
Patch by Jonas Toth!
Differential Revision: https://reviews.llvm.org/D28239
llvm-svn: 296734
2017-03-02 16:28:55 +08:00
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines-no-malloc.html>`_ check
|
|
|
|
|
|
|
|
Allow custom memory management functions to be considered as well.
|
2017-05-02 05:02:38 +08:00
|
|
|
|
|
|
|
- New `misc-forwarding-reference-overload
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/misc-forwarding-reference-overload.html>`_ check
|
[clang-tidy] Function names configurable for cppcoreguidelines-nomalloc - checker
Summary:
Hello everybody,
this is an incremental patch for the NoMalloc-Checker I wrote. It allows to configure the memory-management functions, that are checked,
This might be helpful for a code base with custom functions in use, or non-standard functionality, like posix_memalign.
Reviewers: aaron.ballman, hokein, alexfh
Reviewed By: aaron.ballman, alexfh
Subscribers: sbenza, nemanjai, JDevlieghere
Tags: #clang-tools-extra
Patch by Jonas Toth!
Differential Revision: https://reviews.llvm.org/D28239
llvm-svn: 296734
2017-03-02 16:28:55 +08:00
|
|
|
|
2017-05-02 05:02:38 +08:00
|
|
|
Finds perfect forwarding constructors that can unintentionally hide copy or move constructors.
|
2016-08-31 08:06:55 +08:00
|
|
|
|
2017-04-24 17:27:20 +08:00
|
|
|
- New `modernize-replace-random-shuffle
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/modernize-replace-random-shuffle.html>`_ check
|
|
|
|
|
|
|
|
Finds and fixes usage of ``std::random_shuffle`` as the function has been removed from C++17.
|
|
|
|
|
2017-02-16 01:06:06 +08:00
|
|
|
- New `modernize-return-braced-init-list
|
2017-02-16 01:19:44 +08:00
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/modernize-return-braced-init-list.html>`_ check
|
2017-02-16 01:06:06 +08:00
|
|
|
|
|
|
|
Finds and replaces explicit calls to the constructor in a return statement by
|
|
|
|
a braced initializer list so that the return type is not needlessly repeated.
|
2017-04-06 17:56:42 +08:00
|
|
|
|
2017-05-02 05:02:38 +08:00
|
|
|
- Improved `modernize-use-emplace
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/modernize-use-emplace.html>`_ check
|
2017-02-16 01:06:06 +08:00
|
|
|
|
[clang-tidy] modernize-use-emplace: Remove unnecessary make_tuple calls
Summary:
This patch makes modernize-use-emplace remove unnecessary make_ calls from push_back calls and turn them into emplace_back -- the same way make_pair calls are handled.
Custom make_ calls can be removed for custom tuple-like types -- two new options that control that are `TupleTypes` and `TupleMakeFunctions`. By default, the check removes calls to `std::make_pair` and `std::make_tuple`.
Eq.
```
std::vector<std::tuple<int, char, bool>> v;
v.push_back(std::make_tuple(1, 'A', true)); // --> v.emplace_back(1, 'A', true);
```
Reviewers: alexfh, aaron.ballman, Prazek, hokein
Reviewed By: Prazek
Subscribers: JDevlieghere, xazax.hun, JonasToth, cfe-commits
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D32690
llvm-svn: 303145
2017-05-16 14:32:38 +08:00
|
|
|
Removes unnecessary ``std::make_pair`` and ``std::make_tuple`` calls in
|
|
|
|
push_back calls and turns them into emplace_back. The check now also is able
|
|
|
|
to remove user-defined make functions from ``push_back`` calls on containers
|
|
|
|
of custom tuple-like types by providing `TupleTypes` and `TupleMakeFunctions`.
|
2017-03-03 19:16:34 +08:00
|
|
|
|
2017-04-18 15:46:39 +08:00
|
|
|
- New `performance-inefficient-vector-operation
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/performance-inefficient-vector-operation.html>`_ check
|
|
|
|
|
|
|
|
Finds possible inefficient vector operations in for loops that may cause
|
|
|
|
unnecessary memory reallocations.
|
2017-05-02 05:02:38 +08:00
|
|
|
|
|
|
|
- Added `ParameterThreshold` to `readability-function-size
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/readability-function-size.html>`_ check
|
2017-04-18 15:46:39 +08:00
|
|
|
|
2017-05-02 05:02:38 +08:00
|
|
|
Finds functions that have more than `ParameterThreshold` parameters and emits a warning.
|
[clang-tidy] modernize-use-emplace: remove unnecessary make_pair calls
Summary:
When there is a push_back with a call to make_pair, turn it into emplace_back and remove the unnecessary make_pair call.
Eg.
```
std::vector<std::pair<int, int>> v;
v.push_back(std::make_pair(1, 2)); // --> v.emplace_back(1, 2);
```
make_pair doesn't get removed when explicit template parameters are provided, because of potential problems with type conversions.
Reviewers: Prazek, aaron.ballman, hokein, alexfh
Reviewed By: Prazek, alexfh
Subscribers: JDevlieghere, JonasToth, cfe-commits
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D32395
llvm-svn: 301651
2017-04-29 00:25:45 +08:00
|
|
|
|
2017-05-02 05:02:38 +08:00
|
|
|
- New `readability-misleading-indentation
|
|
|
|
<http://clang.llvm.org/extra/clang-tidy/checks/readability-misleading-indentation.html>`_ check
|
|
|
|
|
|
|
|
Finds misleading indentation where braces should be introduced or the code should be reformatted.
|
|
|
|
|
|
|
|
- Support clang-formatting of the code around applied fixes (``-format-style``
|
|
|
|
command-line option).
|
|
|
|
|
|
|
|
- New `hicpp` module
|
|
|
|
|
|
|
|
Adds checks that implement the `High Integrity C++ Coding Standard <http://www.codingstandard.com/section/index/>`_ and other safety
|
|
|
|
standards. Many checks are aliased to other modules.
|
[clang-tidy] modernize-use-emplace: remove unnecessary make_pair calls
Summary:
When there is a push_back with a call to make_pair, turn it into emplace_back and remove the unnecessary make_pair call.
Eg.
```
std::vector<std::pair<int, int>> v;
v.push_back(std::make_pair(1, 2)); // --> v.emplace_back(1, 2);
```
make_pair doesn't get removed when explicit template parameters are provided, because of potential problems with type conversions.
Reviewers: Prazek, aaron.ballman, hokein, alexfh
Reviewed By: Prazek, alexfh
Subscribers: JDevlieghere, JonasToth, cfe-commits
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D32395
llvm-svn: 301651
2017-04-29 00:25:45 +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...
|