xref: /netbsd-src/external/apache2/llvm/dist/clang/docs/ReleaseNotes.rst (revision e038c9c4676b0f19b1b7dd08a940c6ed64a6d5ae)
1========================================
2Clang 13.0.0 (In-Progress) Release Notes
3========================================
4
5.. contents::
6   :local:
7   :depth: 2
8
9Written by the `LLVM Team <https://llvm.org/>`_
10
11.. warning::
12
13   These are in-progress notes for the upcoming Clang 13 release.
14   Release notes for previous releases can be found on
15   `the Download Page <https://releases.llvm.org/download.html>`_.
16
17Introduction
18============
19
20This document contains the release notes for the Clang C/C++/Objective-C
21frontend, part of the LLVM Compiler Infrastructure, release 13.0.0. Here we
22describe the status of Clang in some detail, including major
23improvements from the previous release and new feature work. For the
24general LLVM release notes, see `the LLVM
25documentation <https://llvm.org/docs/ReleaseNotes.html>`_. All LLVM
26releases may be downloaded from the `LLVM releases web
27site <https://llvm.org/releases/>`_.
28
29For more information about Clang or LLVM, including information about the
30latest release, please see the `Clang Web Site <https://clang.llvm.org>`_ or the
31`LLVM Web Site <https://llvm.org>`_.
32
33Note that if you are reading this file from a Git checkout or the
34main Clang web page, this document applies to the *next* release, not
35the current one. To see the release notes for a specific release, please
36see the `releases page <https://llvm.org/releases/>`_.
37
38What's New in Clang 13.0.0?
39===========================
40
41Some of the major new features and improvements to Clang are listed
42here. Generic improvements to Clang as a whole or to its underlying
43infrastructure are described first, followed by language-specific
44sections with improvements to Clang's support for those languages.
45
46Major New Features
47------------------
48
49- Guaranteed tail calls are now supported with statement attributes
50  ``[[clang::musttail]]`` in C++ and ``__attribute__((musttail))`` in C. The
51  attribute is applied to a return statement (not a function declaration),
52  and an error is emitted if a tail call cannot be guaranteed, for example if
53  the function signatures of caller and callee are not compatible. Guaranteed
54  tail calls enable a class of algorithms that would otherwise use an
55  arbitrary amount of stack space.
56
57Improvements to Clang's diagnostics
58^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
59
60- ...
61
62Non-comprehensive list of changes in this release
63-------------------------------------------------
64
65- ...
66
67New Compiler Flags
68------------------
69
70- ``-Wreserved-identifier`` emits warning when user code uses reserved
71  identifiers.
72
73- ``-fstack-usage`` generates an extra .su file per input source file. The .su
74  file contains frame size information for each function defined in the source
75  file.
76
77Deprecated Compiler Flags
78-------------------------
79
80- ...
81
82Modified Compiler Flags
83-----------------------
84
85- -Wshadow now also checks for shadowed structured bindings
86- ``-B <prefix>`` (when ``<prefix>`` is a directory) was overloaded to additionally
87  detect GCC installations under ``<prefix>`` (``lib{,32,64}/gcc{,-cross}/$triple``).
88  This behavior was incompatible with GCC, caused interop issues with
89  ``--gcc-toolchain``, and was thus dropped. Specify ``--gcc-toolchain=<dir>``
90  instead. ``-B``'s other GCC-compatible semantics are preserved:
91  ``$prefix/$triple-$file`` and ``$prefix$file`` are searched for executables,
92  libraries, includes, and data files used by the compiler.
93
94Removed Compiler Flags
95-------------------------
96
97- The clang-cl ``/fallback`` flag, which made clang-cl invoke Microsoft Visual
98  C++ on files it couldn't compile itself, has been removed.
99
100- ``-Wreturn-std-move-in-c++11``, which checked whether an entity is affected by
101  `CWG1579 <https://wg21.link/CWG1579>`_ to become implicitly movable, has been
102  removed.
103
104New Pragmas in Clang
105--------------------
106
107- ...
108
109Attribute Changes in Clang
110--------------------------
111
112- ...
113
114Windows Support
115---------------
116
117C Language Changes in Clang
118---------------------------
119
120- ...
121
122C++ Language Changes in Clang
123-----------------------------
124
125- The oldest supported GNU libstdc++ is now 4.8.3 (released 2014-05-22).
126  Clang workarounds for bugs in earlier versions have been removed.
127
128- ...
129
130C++20 Feature Support
131^^^^^^^^^^^^^^^^^^^^^
132...
133
134C++2b Feature Support
135^^^^^^^^^^^^^^^^^^^^^
136...
137
138Objective-C Language Changes in Clang
139-------------------------------------
140
141OpenCL C Language Changes in Clang
142----------------------------------
143
144...
145
146ABI Changes in Clang
147--------------------
148
149OpenMP Support in Clang
150-----------------------
151
152- ...
153
154CUDA Support in Clang
155---------------------
156
157- ...
158
159X86 Support in Clang
160--------------------
161
162- ...
163
164Internal API Changes
165--------------------
166
167These are major API changes that have happened since the 12.0.0 release of
168Clang. If upgrading an external codebase that uses Clang as a library,
169this section should help get you past the largest hurdles of upgrading.
170
171- ...
172
173Build System Changes
174--------------------
175
176These are major changes to the build system that have happened since the 12.0.0
177release of Clang. Users of the build system should adjust accordingly.
178
179- The option ``LIBCLANG_INCLUDE_CLANG_TOOLS_EXTRA`` no longer exists. There were
180  two releases with that flag forced off, and no uses were added that forced it
181  on. The recommended replacement is clangd.
182
183- ...
184
185AST Matchers
186------------
187
188- ...
189
190clang-format
191------------
192
193- Option ``SpacesInLineCommentPrefix`` has been added to control the
194  number of spaces in a line comments prefix.
195
196- Option ``SortIncludes`` has been updated from a ``bool`` to an
197  ``enum`` with backwards compatibility. In addition to the previous
198  ``true``/``false`` states (now ``CaseSensitive``/``Never``), a third
199  state has been added (``CaseInsensitive``) which causes an alphabetical sort
200  with case used as a tie-breaker.
201
202  .. code-block:: c++
203
204    // Never (previously false)
205    #include "B/A.h"
206    #include "A/B.h"
207    #include "a/b.h"
208    #include "A/b.h"
209    #include "B/a.h"
210
211    // CaseSensitive (previously true)
212    #include "A/B.h"
213    #include "A/b.h"
214    #include "B/A.h"
215    #include "B/a.h"
216    #include "a/b.h"
217
218    // CaseInsensitive
219    #include "A/B.h"
220    #include "A/b.h"
221    #include "a/b.h"
222    #include "B/A.h"
223    #include "B/a.h"
224
225- ``BasedOnStyle: InheritParentConfig`` allows to use the ``.clang-format`` of
226  the parent directories to overwrite only parts of it.
227
228- Option ``IndentAccessModifiers`` has been added to be able to give access
229  modifiers their own indentation level inside records.
230
231- Option ``ShortNamespaceLines`` has been added to give better control
232  over ``FixNamespaceComments`` when determining a namespace length.
233
234- Support for Whitesmiths has been improved, with fixes for ``namespace`` blocks
235  and ``case`` blocks and labels.
236
237- Option ``EmptyLineAfterAccessModifier`` has been added to remove, force or keep
238  new lines after access modifiers.
239
240- Checks for newlines in option ``EmptyLineBeforeAccessModifier`` are now based
241  on the formatted new lines and not on the new lines in the file. (Fixes
242  https://llvm.org/PR41870.)
243
244- Option ``SpacesInAngles`` has been improved, it now accepts ``Leave`` value
245  that allows to keep spaces where they are already present.
246
247- Option ``AllowShortIfStatementsOnASingleLine`` has been improved, it now
248  accepts ``AllIfsAndElse`` value that allows to put "else if" and "else" short
249  statements on a single line. (Fixes https://llvm.org/PR50019.)
250
251- ``git-clang-format`` no longer formats changes to symbolic links. (Fixes
252  https://llvm.org/PR46992.)
253
254libclang
255--------
256
257- ...
258
259Static Analyzer
260---------------
261
262- ...
263
264.. _release-notes-ubsan:
265
266Undefined Behavior Sanitizer (UBSan)
267------------------------------------
268
269Core Analysis Improvements
270==========================
271
272- ...
273
274New Issues Found
275================
276
277- ...
278
279Python Binding Changes
280----------------------
281
282The following methods have been added:
283
284-  ...
285
286Significant Known Problems
287==========================
288
289Additional Information
290======================
291
292A wide variety of additional information is available on the `Clang web
293page <https://clang.llvm.org/>`_. The web page contains versions of the
294API documentation which are up-to-date with the Git version of
295the source code. You can access versions of these documents specific to
296this release by going into the "``clang/docs/``" directory in the Clang
297tree.
298
299If you have any questions or comments about Clang, please feel free to
300contact us via the `mailing
301list <https://lists.llvm.org/mailman/listinfo/cfe-dev>`_.
302