Debian Codegraph @

llvm-project/clang-tools-extra/docs/ReleaseNotes.rst

raw
1 ====================================================
2 Extra Clang Tools |release| |ReleaseNotesTitle|
3 ====================================================
4
5 .. contents::
6 :local:
7 :depth: 3
8
9 Written by the `LLVM Team <https://llvm.org/>`_
10
11 .. only:: PreRelease
12
13 .. warning::
14 These are in-progress notes for the upcoming Extra Clang Tools |version| release.
15 Release notes for previous releases can be found on
16 `the Download Page <https://releases.llvm.org/download.html>`_.
17
18 Introduction
19 ============
20
21 This document contains the release notes for the Extra Clang Tools, part of the
22 Clang release |release|. Here we describe the status of the Extra Clang Tools in
23 some detail, including major improvements from the previous release and new
24 feature work. All LLVM releases may be downloaded from the `LLVM releases web
25 site <https://llvm.org/releases/>`_.
26
27 For more information about Clang or LLVM, including information about
28 the latest release, please see the `Clang Web Site <https://clang.llvm.org>`_ or
29 the `LLVM Web Site <https://llvm.org>`_.
30
31 Note that if you are reading this file from a Git checkout or the
32 main Clang web page, this document applies to the *next* release, not
33 the current one. To see the release notes for a specific release, please
34 see the `releases page <https://llvm.org/releases/>`_.
35
36 What's New in Extra Clang Tools |release|?
37 ==========================================
38
39 Some of the major new features and improvements to Extra Clang Tools are listed
40 here. Generic improvements to Extra Clang Tools as a whole or to its underlying
41 infrastructure are described first, followed by tool-specific sections.
42
43 Major New Features
44 ------------------
45
46 ...
47
48 Improvements to clangd
49 ----------------------
50
51 Inlay hints
52 ^^^^^^^^^^^
53
54 Diagnostics
55 ^^^^^^^^^^^
56
57 Semantic Highlighting
58 ^^^^^^^^^^^^^^^^^^^^^
59
60 Compile flags
61 ^^^^^^^^^^^^^
62
63 Hover
64 ^^^^^
65
66 Code completion
67 ^^^^^^^^^^^^^^^
68
69 Signature help
70 ^^^^^^^^^^^^^^
71
72 Cross-references
73 ^^^^^^^^^^^^^^^^
74
75 Objective-C
76 ^^^^^^^^^^^
77
78 Miscellaneous
79 ^^^^^^^^^^^^^
80
81 Improvements to clang-doc
82 -------------------------
83
84 - The default executor was changed to standalone to match other tools.
85
86 Improvements to clang-query
87 ---------------------------
88
89 The improvements are...
90
91 Improvements to clang-rename
92 ----------------------------
93
94 The improvements are...
95
96 Improvements to clang-tidy
97 --------------------------
98
99 - Change to Python 3 in the shebang of `add_new_check.py` and `rename_check.py`,
100 as the existing code is not compatible with Python 2.
101
102 - Fix a minor bug in `add_new_check.py` to only traverse subdirectories
103 when updating the list of checks in the documentation.
104
105 - Deprecate the global configuration file option `AnalyzeTemporaryDtors`,
106 which is no longer in use. The option will be fully removed in
107 :program:`clang-tidy` version 18.
108
109 New checks
110 ^^^^^^^^^^
111
112 - New :doc:`bugprone-suspicious-realloc-usage
113 <clang-tidy/checks/bugprone/suspicious-realloc-usage>` check.
114
115 Finds usages of ``realloc`` where the return value is assigned to the
116 same expression as passed to the first argument.
117
118 - New :doc:`cppcoreguidelines-avoid-const-or-ref-data-members
119 <clang-tidy/checks/cppcoreguidelines/avoid-const-or-ref-data-members>` check.
120
121 Warns when a struct or class uses const or reference (lvalue or rvalue) data members.
122
123 - New :doc:`cppcoreguidelines-avoid-do-while
124 <clang-tidy/checks/cppcoreguidelines/avoid-do-while>` check.
125
126 Warns when using ``do-while`` loops.
127
128 - New :doc:`cppcoreguidelines-avoid-reference-coroutine-parameters
129 <clang-tidy/checks/cppcoreguidelines/avoid-reference-coroutine-parameters>` check.
130
131 Warns on coroutines that accept reference parameters.
132
133 - New :doc:`misc-use-anonymous-namespace
134 <clang-tidy/checks/misc/use-anonymous-namespace>` check.
135
136 Warns when using ``static`` function or variables at global scope, and suggests
137 moving them into an anonymous namespace.
138
139 - New :doc:`bugprone-standalone-empty <clang-tidy/checks/bugprone/standalone-empty>` check.
140
141 Warns when `empty()` is used on a range and the result is ignored. Suggests `clear()`
142 if it is an existing member function.
143
144 New check aliases
145 ^^^^^^^^^^^^^^^^^
146
147 - New alias :doc:`cert-msc54-cpp
148 <clang-tidy/checks/cert/msc54-cpp>` to
149 :doc:`bugprone-signal-handler
150 <clang-tidy/checks/bugprone/signal-handler>` was added.
151
152
153 Changes in existing checks
154 ^^^^^^^^^^^^^^^^^^^^^^^^^^
155
156 - Fixed a false positive in :doc:`bugprone-assignment-in-if-condition
157 <clang-tidy/checks/bugprone/assignment-in-if-condition>` check when there
158 was an assignement in a lambda found in the condition of an ``if``.
159
160 - Improved :doc:`bugprone-signal-handler
161 <clang-tidy/checks/bugprone/signal-handler>` check. Partial
162 support for C++14 signal handler rules was added. Bug report generation was
163 improved.
164
165 - Fixed a false positive in :doc:`cppcoreguidelines-pro-type-member-init
166 <clang-tidy/checks/cppcoreguidelines/pro-type-member-init>` when warnings
167 would be emitted for uninitialized members of an anonymous union despite
168 there being an initializer for one of the other members.
169
170 - Fixed false positives in :doc:`google-objc-avoid-throwing-exception
171 <clang-tidy/checks/google/objc-avoid-throwing-exception>` check for exceptions
172 thrown by code emitted from macros in system headers.
173
174 - Improved :doc:`misc-redundant-expression <clang-tidy/checks/misc/redundant-expression>`
175 check.
176
177 The check now skips concept definitions since redundant expressions still make sense
178 inside them.
179
180 - Improved :doc:`modernize-loop-convert <clang-tidy/checks/modernize/loop-convert>`
181 to check for container functions ``begin``/``end`` etc on base classes of the container
182 type, instead of only as direct members of the container type itself.
183
184 - Improved :doc:`modernize-use-emplace <clang-tidy/checks/modernize/use-emplace>`
185 check.
186
187 The check now supports detecting inefficient invocations of ``push`` and
188 ``push_front`` on STL-style containers and replacing them with ``emplace``
189 or ``emplace_front``.
190
191 The check now supports detecting alias cases of ``push_back`` ``push`` and
192 ``push_front`` on STL-style containers and replacing them with ``emplace_back``,
193 ``emplace`` or ``emplace_front``.
194
195 - Improved :doc:`modernize-use-equals-default <clang-tidy/checks/modernize/use-equals-default>`
196 check.
197
198 The check now skips unions/union-like classes since in this case a default constructor
199 with empty body is not equivalent to the explicitly defaulted one, variadic constructors
200 since they cannot be explicitly defaulted. The check also skips copy assignment operators
201 with nonstandard return types, template constructors, private/protected default constructors
202 for C++17 or earlier. The automatic fixit has been adjusted to avoid adding superfluous
203 semicolon. The check is restricted to C++11 or later.
204
205 - Change the default behavior of :doc:`readability-avoid-const-params-in-decls
206 <clang-tidy/checks/readability/avoid-const-params-in-decls>` to not
207 warn about `const` value parameters of declarations inside macros.
208
209 - Fixed crashes in :doc:`readability-braces-around-statements
210 <clang-tidy/checks/readability/braces-around-statements>` and
211 :doc:`readability-simplify-boolean-expr <clang-tidy/checks/readability/simplify-boolean-expr>`
212 when using a C++23 ``if consteval`` statement.
213
214 - Change the behavior of :doc:`readability-const-return-type
215 <clang-tidy/checks/readability/const-return-type>` to not
216 warn about `const` return types in overridden functions since the derived
217 class cannot always choose to change the function signature.
218
219 - Change the default behavior of :doc:`readability-const-return-type
220 <clang-tidy/checks/readability/const-return-type>` to not
221 warn about `const` value parameters of declarations inside macros.
222
223 - Support removing ``c_str`` calls from ``std::string_view`` constructor calls in
224 :doc:`readability-redundant-string-cstr <clang-tidy/checks/readability/redundant-string-cstr>`
225 check.
226
227 Removed checks
228 ^^^^^^^^^^^^^^
229
230 Improvements to include-fixer
231 -----------------------------
232
233 The improvements are...
234
235 Improvements to clang-include-fixer
236 -----------------------------------
237
238 The improvements are...
239
240 Improvements to modularize
241 --------------------------
242
243 The improvements are...
244
245 Improvements to pp-trace
246 ------------------------
247
248 Clang-tidy Visual Studio plugin
249 -------------------------------