annotate clang-tools-extra/docs/ReleaseNotes.rst @ 223:5f17cb93ff66 llvm-original

LLVM13 (2021/7/18)
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 18 Jul 2021 22:43:00 +0900
parents 79ff65ed7e25
children 5f20bc1ed4ff
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 ====================================================
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
2 Extra Clang Tools 13.0.0 (In-Progress) Release Notes
150
anatofuz
parents:
diff changeset
3 ====================================================
anatofuz
parents:
diff changeset
4
anatofuz
parents:
diff changeset
5 .. contents::
anatofuz
parents:
diff changeset
6 :local:
anatofuz
parents:
diff changeset
7 :depth: 3
anatofuz
parents:
diff changeset
8
anatofuz
parents:
diff changeset
9 Written by the `LLVM Team <https://llvm.org/>`_
anatofuz
parents:
diff changeset
10
anatofuz
parents:
diff changeset
11 .. warning::
anatofuz
parents:
diff changeset
12
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
13 These are in-progress notes for the upcoming Extra Clang Tools 13 release.
150
anatofuz
parents:
diff changeset
14 Release notes for previous releases can be found on
anatofuz
parents:
diff changeset
15 `the Download Page <https://releases.llvm.org/download.html>`_.
anatofuz
parents:
diff changeset
16
anatofuz
parents:
diff changeset
17 Introduction
anatofuz
parents:
diff changeset
18 ============
anatofuz
parents:
diff changeset
19
anatofuz
parents:
diff changeset
20 This document contains the release notes for the Extra Clang Tools, part of the
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
21 Clang release 13.0.0. Here we describe the status of the Extra Clang Tools in
150
anatofuz
parents:
diff changeset
22 some detail, including major improvements from the previous release and new
anatofuz
parents:
diff changeset
23 feature work. All LLVM releases may be downloaded from the `LLVM releases web
anatofuz
parents:
diff changeset
24 site <https://llvm.org/releases/>`_.
anatofuz
parents:
diff changeset
25
anatofuz
parents:
diff changeset
26 For more information about Clang or LLVM, including information about
anatofuz
parents:
diff changeset
27 the latest release, please see the `Clang Web Site <https://clang.llvm.org>`_ or
anatofuz
parents:
diff changeset
28 the `LLVM Web Site <https://llvm.org>`_.
anatofuz
parents:
diff changeset
29
anatofuz
parents:
diff changeset
30 Note that if you are reading this file from a Git checkout or the
anatofuz
parents:
diff changeset
31 main Clang web page, this document applies to the *next* release, not
anatofuz
parents:
diff changeset
32 the current one. To see the release notes for a specific release, please
anatofuz
parents:
diff changeset
33 see the `releases page <https://llvm.org/releases/>`_.
anatofuz
parents:
diff changeset
34
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
35 What's New in Extra Clang Tools 13.0.0?
150
anatofuz
parents:
diff changeset
36 =======================================
anatofuz
parents:
diff changeset
37
anatofuz
parents:
diff changeset
38 Some of the major new features and improvements to Extra Clang Tools are listed
anatofuz
parents:
diff changeset
39 here. Generic improvements to Extra Clang Tools as a whole or to its underlying
anatofuz
parents:
diff changeset
40 infrastructure are described first, followed by tool-specific sections.
anatofuz
parents:
diff changeset
41
anatofuz
parents:
diff changeset
42 Major New Features
anatofuz
parents:
diff changeset
43 ------------------
anatofuz
parents:
diff changeset
44
anatofuz
parents:
diff changeset
45 ...
anatofuz
parents:
diff changeset
46
anatofuz
parents:
diff changeset
47 Improvements to clangd
anatofuz
parents:
diff changeset
48 ----------------------
anatofuz
parents:
diff changeset
49
anatofuz
parents:
diff changeset
50 The improvements are...
anatofuz
parents:
diff changeset
51
anatofuz
parents:
diff changeset
52 Improvements to clang-doc
anatofuz
parents:
diff changeset
53 -------------------------
anatofuz
parents:
diff changeset
54
anatofuz
parents:
diff changeset
55 The improvements are...
anatofuz
parents:
diff changeset
56
anatofuz
parents:
diff changeset
57 Improvements to clang-query
anatofuz
parents:
diff changeset
58 ---------------------------
anatofuz
parents:
diff changeset
59
anatofuz
parents:
diff changeset
60 The improvements are...
anatofuz
parents:
diff changeset
61
anatofuz
parents:
diff changeset
62 Improvements to clang-rename
anatofuz
parents:
diff changeset
63 ----------------------------
anatofuz
parents:
diff changeset
64
anatofuz
parents:
diff changeset
65 The improvements are...
anatofuz
parents:
diff changeset
66
anatofuz
parents:
diff changeset
67 Improvements to clang-tidy
anatofuz
parents:
diff changeset
68 --------------------------
anatofuz
parents:
diff changeset
69
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
70 - The `run-clang-tidy.py` helper script is now installed in `bin/` as
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
71 `run-clang-tidy`. It was previously installed in `share/clang/`.
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
72
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
73 - Added command line option `--fix-notes` to apply fixes found in notes
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
74 attached to warnings. These are typically cases where we are less confident
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
75 the fix will have the desired effect.
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
76
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
77 - libToolingCore and Clang-Tidy was refactored and now checks can produce
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
78 highlights (`^~~~~` under fragments of the source code) in diagnostics.
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
79 Existing and new checks in the future can be expected to start implementing
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
80 this functionality.
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
81 This change only affects the visual rendering of diagnostics, and does not
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
82 alter the behavior of generated fixes.
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
83
150
anatofuz
parents:
diff changeset
84 New checks
anatofuz
parents:
diff changeset
85 ^^^^^^^^^^
anatofuz
parents:
diff changeset
86
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
87 - New :doc:`bugprone-implicit-widening-of-multiplication-result
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
88 <clang-tidy/checks/bugprone-implicit-widening-of-multiplication-result>` check.
150
anatofuz
parents:
diff changeset
89
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
90 Diagnoses instances of an implicit widening of multiplication result.
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
91
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
92 - New :doc:`concurrency-thread-canceltype-asynchronous
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
93 <clang-tidy/checks/concurrency-thread-canceltype-asynchronous>` check.
150
anatofuz
parents:
diff changeset
94
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
95 Finds ``pthread_setcanceltype`` function calls where a thread's cancellation
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
96 type is set to asynchronous.
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
97
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
98 - New :doc:`altera-id-dependent-backward-branch
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
99 <clang-tidy/checks/altera-id-dependent-backward-branch>` check.
150
anatofuz
parents:
diff changeset
100
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
101 Finds ID-dependent variables and fields that are used within loops. This
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
102 causes branches to occur inside the loops, and thus leads to performance
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
103 degradation.
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
104
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
105 - New :doc:`altera-unroll-loops
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
106 <clang-tidy/checks/altera-unroll-loops>` check.
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
107
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
108 Finds inner loops that have not been unrolled, as well as fully unrolled
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
109 loops with unknown loops bounds or a large number of iterations.
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
110
223
5f17cb93ff66 LLVM13 (2021/7/18)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 221
diff changeset
111 - New :doc:`bugprone-easily-swappable-parameters
5f17cb93ff66 LLVM13 (2021/7/18)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 221
diff changeset
112 <clang-tidy/checks/bugprone-easily-swappable-parameters>` check.
5f17cb93ff66 LLVM13 (2021/7/18)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 221
diff changeset
113
5f17cb93ff66 LLVM13 (2021/7/18)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 221
diff changeset
114 Finds function definitions where parameters of convertible types follow each
5f17cb93ff66 LLVM13 (2021/7/18)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 221
diff changeset
115 other directly, making call sites prone to calling the function with
5f17cb93ff66 LLVM13 (2021/7/18)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 221
diff changeset
116 swapped (or badly ordered) arguments.
5f17cb93ff66 LLVM13 (2021/7/18)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 221
diff changeset
117
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
118 - New :doc:`cppcoreguidelines-prefer-member-initializer
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
119 <clang-tidy/checks/cppcoreguidelines-prefer-member-initializer>` check.
150
anatofuz
parents:
diff changeset
120
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
121 Finds member initializations in the constructor body which can be placed into
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
122 the initialization list instead.
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
123
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
124 - New :doc:`bugprone-unhandled-exception-at-new
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
125 <clang-tidy/checks/bugprone-unhandled-exception-at-new>` check.
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
126
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
127 Finds calls to ``new`` with missing exception handler for ``std::bad_alloc``.
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
128
150
anatofuz
parents:
diff changeset
129 New check aliases
anatofuz
parents:
diff changeset
130 ^^^^^^^^^^^^^^^^^
anatofuz
parents:
diff changeset
131
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
132 - New alias :doc:`cert-pos47-c
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
133 <clang-tidy/checks/cert-pos47-c>` to
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
134 :doc:`concurrency-thread-canceltype-asynchronous
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
135 <clang-tidy/checks/concurrency-thread-canceltype-asynchronous>` was added.
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
136
150
anatofuz
parents:
diff changeset
137 Changes in existing checks
anatofuz
parents:
diff changeset
138 ^^^^^^^^^^^^^^^^^^^^^^^^^^
anatofuz
parents:
diff changeset
139
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
140 - Improved :doc:`bugprone-signal-handler
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
141 <clang-tidy/checks/bugprone-signal-handler>` check.
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
142
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
143 Added an option to choose the set of allowed functions.
150
anatofuz
parents:
diff changeset
144
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
145 - Improved :doc:`readability-uniqueptr-delete-release
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
146 <clang-tidy/checks/readability-uniqueptr-delete-release>` check.
150
anatofuz
parents:
diff changeset
147
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
148 Added an option to choose whether to refactor by calling the ``reset`` member
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
149 function or assignment to ``nullptr``.
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
150 Added support for pointers to ``std::unique_ptr``.
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
151
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
152 Removed checks
150
anatofuz
parents:
diff changeset
153 ^^^^^^^^^^^^^^
anatofuz
parents:
diff changeset
154
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
155 - The readability-deleted-default check has been removed.
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
156
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
157 The clang warning `Wdefaulted-function-deleted
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
158 <https://clang.llvm.org/docs/DiagnosticsReference.html#wdefaulted-function-deleted>`_
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
159 will diagnose the same issues and is enabled by default.
150
anatofuz
parents:
diff changeset
160
anatofuz
parents:
diff changeset
161 Improvements to include-fixer
anatofuz
parents:
diff changeset
162 -----------------------------
anatofuz
parents:
diff changeset
163
anatofuz
parents:
diff changeset
164 The improvements are...
anatofuz
parents:
diff changeset
165
anatofuz
parents:
diff changeset
166 Improvements to clang-include-fixer
anatofuz
parents:
diff changeset
167 -----------------------------------
anatofuz
parents:
diff changeset
168
anatofuz
parents:
diff changeset
169 The improvements are...
anatofuz
parents:
diff changeset
170
anatofuz
parents:
diff changeset
171 Improvements to modularize
anatofuz
parents:
diff changeset
172 --------------------------
anatofuz
parents:
diff changeset
173
anatofuz
parents:
diff changeset
174 The improvements are...
anatofuz
parents:
diff changeset
175
anatofuz
parents:
diff changeset
176 Improvements to pp-trace
anatofuz
parents:
diff changeset
177 ------------------------
anatofuz
parents:
diff changeset
178
anatofuz
parents:
diff changeset
179 The improvements are...
anatofuz
parents:
diff changeset
180
anatofuz
parents:
diff changeset
181 Clang-tidy visual studio plugin
anatofuz
parents:
diff changeset
182 -------------------------------