1========================================
2Clang 12.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 12 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 12.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 12.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- ...
50
51Improvements to Clang's diagnostics
52^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
53
54- ...
55
56Non-comprehensive list of changes in this release
57-------------------------------------------------
58
59- ...
60
61New Compiler Flags
62------------------
63
64- ...
65
66- -fpch-codegen and -fpch-debuginfo generate shared code and/or debuginfo
67  for contents of a precompiled header in a separate object file. This object
68  file needs to be linked in, but its contents do not need to be generated
69  for other objects using the precompiled header. This should usually save
70  compile time. If not using clang-cl, the separate object file needs to
71  be created explicitly from the precompiled header.
72  Example of use:
73
74  .. code-block:: console
75
76    $ clang++ -x c++-header header.h -o header.pch -fpch-codegen -fpch-debuginfo
77    $ clang++ -c header.pch -o shared.o
78    $ clang++ -c source.cpp -o source.o -include-pch header.pch
79    $ clang++ -o binary source.o shared.o
80
81  - Using -fpch-instantiate-templates when generating the precompiled header
82    usually increases the amount of code/debuginfo that can be shared.
83  - In some cases, especially when building with optimizations enabled, using
84    -fpch-codegen may generate so much code in the shared object that compiling
85    it may be a net loss in build time.
86  - Since headers may bring in private symbols of other libraries, it may be
87    sometimes necessary to discard unused symbols (such as by adding
88    -Wl,--gc-sections on ELF platforms to the linking command, and possibly
89    adding -fdata-sections -ffunction-sections to the command generating
90    the shared object).
91
92Deprecated Compiler Flags
93-------------------------
94
95The following options are deprecated and ignored. They will be removed in
96future versions of Clang.
97
98- ...
99
100Modified Compiler Flags
101-----------------------
102
103- On ELF, ``-gz`` now defaults to ``-gz=zlib`` with the integrated assembler.
104  It produces ``SHF_COMPRESSED`` style compression of debug information. GNU
105  binutils 2.26 or newer, or lld is required to link produced object files. Use
106  ``-gz=zlib-gnu`` to get the old behavior.
107
108New Pragmas in Clang
109--------------------
110
111- ...
112
113Attribute Changes in Clang
114--------------------------
115
116- ...
117
118Windows Support
119---------------
120
121C Language Changes in Clang
122---------------------------
123
124- ...
125
126C++ Language Changes in Clang
127-----------------------------
128
129- ...
130
131C++1z Feature Support
132^^^^^^^^^^^^^^^^^^^^^
133...
134
135Objective-C Language Changes in Clang
136-------------------------------------
137
138OpenCL C Language Changes in Clang
139----------------------------------
140
141...
142
143ABI Changes in Clang
144--------------------
145
146OpenMP Support in Clang
147-----------------------
148
149- ...
150
151CUDA Support in Clang
152---------------------
153
154- ...
155
156Internal API Changes
157--------------------
158
159These are major API changes that have happened since the 11.0.0 release of
160Clang. If upgrading an external codebase that uses Clang as a library,
161this section should help get you past the largest hurdles of upgrading.
162
163- ...
164
165Build System Changes
166--------------------
167
168These are major changes to the build system that have happened since the 11.0.0
169release of Clang. Users of the build system should adjust accordingly.
170
171- ...
172
173AST Matchers
174------------
175
176- ...
177
178clang-format
179------------
180
181- Option ``BitFieldColonSpacing`` has been added that decides how
182  space should be added around identifier, colon and bit-width in
183  bitfield definitions.
184
185  .. code-block:: c++
186
187    // Both (default)
188    struct F {
189      unsigned dscp : 6;
190      unsigned ecn  : 2; // AlignConsecutiveBitFields=true
191    };
192    // None
193    struct F {
194      unsigned dscp:6;
195      unsigned ecn :2;
196    };
197    // Before
198    struct F {
199      unsigned dscp :6;
200      unsigned ecn  :2;
201    };
202    // After
203    struct F {
204      unsigned dscp: 6;
205      unsigned ecn : 2;
206    };
207
208
209libclang
210--------
211
212- ...
213
214Static Analyzer
215---------------
216
217- ...
218
219.. _release-notes-ubsan:
220
221Undefined Behavior Sanitizer (UBSan)
222------------------------------------
223
224Core Analysis Improvements
225==========================
226
227- ...
228
229New Issues Found
230================
231
232- ...
233
234Python Binding Changes
235----------------------
236
237The following methods have been added:
238
239-  ...
240
241Significant Known Problems
242==========================
243
244Additional Information
245======================
246
247A wide variety of additional information is available on the `Clang web
248page <https://clang.llvm.org/>`_. The web page contains versions of the
249API documentation which are up-to-date with the Git version of
250the source code. You can access versions of these documents specific to
251this release by going into the "``clang/docs/``" directory in the Clang
252tree.
253
254If you have any questions or comments about Clang, please feel free to
255contact us via the `mailing
256list <https://lists.llvm.org/mailman/listinfo/cfe-dev>`_.
257