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- The default value of _MSC_VER was raised from 1911 to 1914. MSVC 19.14 has the
66  support to overaligned objects on x86_32 which is required for some LLVM
67  passes.
68
69New Compiler Flags
70------------------
71
72- ``-Wreserved-identifier`` emits warning when user code uses reserved
73  identifiers.
74
75- ``-fstack-usage`` generates an extra .su file per input source file. The .su
76  file contains frame size information for each function defined in the source
77  file.
78
79Deprecated Compiler Flags
80-------------------------
81
82- ...
83
84Modified Compiler Flags
85-----------------------
86
87- -Wshadow now also checks for shadowed structured bindings
88- ``-B <prefix>`` (when ``<prefix>`` is a directory) was overloaded to additionally
89  detect GCC installations under ``<prefix>`` (``lib{,32,64}/gcc{,-cross}/$triple``).
90  This behavior was incompatible with GCC, caused interop issues with
91  ``--gcc-toolchain``, and was thus dropped. Specify ``--gcc-toolchain=<dir>``
92  instead. ``-B``'s other GCC-compatible semantics are preserved:
93  ``$prefix/$triple-$file`` and ``$prefix$file`` are searched for executables,
94  libraries, includes, and data files used by the compiler.
95
96Removed Compiler Flags
97-------------------------
98
99- The clang-cl ``/fallback`` flag, which made clang-cl invoke Microsoft Visual
100  C++ on files it couldn't compile itself, has been removed.
101
102- ``-Wreturn-std-move-in-c++11``, which checked whether an entity is affected by
103  `CWG1579 <https://wg21.link/CWG1579>`_ to become implicitly movable, has been
104  removed.
105
106New Pragmas in Clang
107--------------------
108
109- ...
110
111Attribute Changes in Clang
112--------------------------
113
114- ...
115
116- Added support for C++11-style ``[[]]`` attributes on using-declarations, as a
117  clang extension.
118
119Windows Support
120---------------
121
122C Language Changes in Clang
123---------------------------
124
125- ...
126
127C++ Language Changes in Clang
128-----------------------------
129
130- The oldest supported GNU libstdc++ is now 4.8.3 (released 2014-05-22).
131  Clang workarounds for bugs in earlier versions have been removed.
132
133- ...
134
135C++20 Feature Support
136^^^^^^^^^^^^^^^^^^^^^
137...
138
139C++2b Feature Support
140^^^^^^^^^^^^^^^^^^^^^
141...
142
143Objective-C Language Changes in Clang
144-------------------------------------
145
146OpenCL C Language Changes in Clang
147----------------------------------
148
149...
150
151ABI Changes in Clang
152--------------------
153
154OpenMP Support in Clang
155-----------------------
156
157- ...
158
159CUDA Support in Clang
160---------------------
161
162- ...
163
164X86 Support in Clang
165--------------------
166
167- ...
168
169Internal API Changes
170--------------------
171
172These are major API changes that have happened since the 12.0.0 release of
173Clang. If upgrading an external codebase that uses Clang as a library,
174this section should help get you past the largest hurdles of upgrading.
175
176- ...
177
178Build System Changes
179--------------------
180
181These are major changes to the build system that have happened since the 12.0.0
182release of Clang. Users of the build system should adjust accordingly.
183
184- The option ``LIBCLANG_INCLUDE_CLANG_TOOLS_EXTRA`` no longer exists. There were
185  two releases with that flag forced off, and no uses were added that forced it
186  on. The recommended replacement is clangd.
187
188- ...
189
190AST Matchers
191------------
192
193- ...
194
195clang-format
196------------
197
198- Option ``SpacesInLineCommentPrefix`` has been added to control the
199  number of spaces in a line comments prefix.
200
201- Option ``SortIncludes`` has been updated from a ``bool`` to an
202  ``enum`` with backwards compatibility. In addition to the previous
203  ``true``/``false`` states (now ``CaseSensitive``/``Never``), a third
204  state has been added (``CaseInsensitive``) which causes an alphabetical sort
205  with case used as a tie-breaker.
206
207  .. code-block:: c++
208
209    // Never (previously false)
210    #include "B/A.h"
211    #include "A/B.h"
212    #include "a/b.h"
213    #include "A/b.h"
214    #include "B/a.h"
215
216    // CaseSensitive (previously true)
217    #include "A/B.h"
218    #include "A/b.h"
219    #include "B/A.h"
220    #include "B/a.h"
221    #include "a/b.h"
222
223    // CaseInsensitive
224    #include "A/B.h"
225    #include "A/b.h"
226    #include "a/b.h"
227    #include "B/A.h"
228    #include "B/a.h"
229
230- ``BasedOnStyle: InheritParentConfig`` allows to use the ``.clang-format`` of
231  the parent directories to overwrite only parts of it.
232
233- Option ``IndentAccessModifiers`` has been added to be able to give access
234  modifiers their own indentation level inside records.
235
236- Option ``PPIndentWidth`` has been added to be able to configure pre-processor
237  indentation independent from regular code.
238
239- Option ``ShortNamespaceLines`` has been added to give better control
240  over ``FixNamespaceComments`` when determining a namespace length.
241
242- Support for Whitesmiths has been improved, with fixes for ``namespace`` blocks
243  and ``case`` blocks and labels.
244
245- Option ``EmptyLineAfterAccessModifier`` has been added to remove, force or keep
246  new lines after access modifiers.
247
248- Checks for newlines in option ``EmptyLineBeforeAccessModifier`` are now based
249  on the formatted new lines and not on the new lines in the file. (Fixes
250  https://llvm.org/PR41870.)
251
252- Option ``SpacesInAngles`` has been improved, it now accepts ``Leave`` value
253  that allows to keep spaces where they are already present.
254
255- Option ``AllowShortIfStatementsOnASingleLine`` has been improved, it now
256  accepts ``AllIfsAndElse`` value that allows to put "else if" and "else" short
257  statements on a single line. (Fixes https://llvm.org/PR50019.)
258
259- Option ``BreakInheritanceList`` gets a new style, ``AfterComma``. It breaks
260  only after the commas that separate the base-specifiers.
261
262- ``git-clang-format`` no longer formats changes to symbolic links. (Fixes
263  https://llvm.org/PR46992.)
264
265- Makes ``PointerAligment: Right`` working with ``AlignConsecutiveDeclarations``.
266  (Fixes https://llvm.org/PR27353)
267
268libclang
269--------
270
271- ...
272
273Static Analyzer
274---------------
275
276- ...
277
278.. _release-notes-ubsan:
279
280Undefined Behavior Sanitizer (UBSan)
281------------------------------------
282
283Core Analysis Improvements
284==========================
285
286- ...
287
288New Issues Found
289================
290
291- ...
292
293Python Binding Changes
294----------------------
295
296The following methods have been added:
297
298-  ...
299
300Significant Known Problems
301==========================
302
303Additional Information
304======================
305
306A wide variety of additional information is available on the `Clang web
307page <https://clang.llvm.org/>`_. The web page contains versions of the
308API documentation which are up-to-date with the Git version of
309the source code. You can access versions of these documents specific to
310this release by going into the "``clang/docs/``" directory in the Clang
311tree.
312
313If you have any questions or comments about Clang, please feel free to
314contact us via the `mailing
315list <https://lists.llvm.org/mailman/listinfo/cfe-dev>`_.
316