blob: e04e568ddb0a935454bde6d13e09802643a944a1 [file] [log] [blame]
Hans Wennborg8f5b44a2019-07-18 11:51:05 +00001========================================
2Clang 10.0.0 (In-Progress) Release Notes
3========================================
Sean Silvafe251442012-12-23 01:19:35 +00004
5.. contents::
6 :local:
7 :depth: 2
8
Hans Wennborg0aa0d912018-09-10 08:51:25 +00009Written by the `LLVM Team <https://llvm.org/>`_
Sean Silvafe251442012-12-23 01:19:35 +000010
11.. warning::
12
Hans Wennborg8f5b44a2019-07-18 11:51:05 +000013 These are in-progress notes for the upcoming Clang 10 release.
Hans Wennborg189f1f32017-02-09 23:26:34 +000014 Release notes for previous releases can be found on
Hans Wennborg0aa0d912018-09-10 08:51:25 +000015 `the Download Page <https://releases.llvm.org/download.html>`_.
Sean Silvafe251442012-12-23 01:19:35 +000016
17Introduction
18============
19
20This document contains the release notes for the Clang C/C++/Objective-C
Hans Wennborg8f5b44a2019-07-18 11:51:05 +000021frontend, part of the LLVM Compiler Infrastructure, release 10.0.0. Here we
Sean Silvafe251442012-12-23 01:19:35 +000022describe 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
Hans Wennborg0aa0d912018-09-10 08:51:25 +000025documentation <https://llvm.org/docs/ReleaseNotes.html>`_. All LLVM
Sean Silvafe251442012-12-23 01:19:35 +000026releases may be downloaded from the `LLVM releases web
Hans Wennborg0aa0d912018-09-10 08:51:25 +000027site <https://llvm.org/releases/>`_.
Sean Silvafe251442012-12-23 01:19:35 +000028
Hans Wennborgd878ca82017-08-30 18:35:44 +000029For more information about Clang or LLVM, including information about the
Hans Wennborg0aa0d912018-09-10 08:51:25 +000030latest release, please see the `Clang Web Site <https://clang.llvm.org>`_ or the
31`LLVM Web Site <https://llvm.org>`_.
Sean Silvafe251442012-12-23 01:19:35 +000032
33Note that if you are reading this file from a Subversion 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
Hans Wennborg0aa0d912018-09-10 08:51:25 +000036see the `releases page <https://llvm.org/releases/>`_.
Sean Silvafe251442012-12-23 01:19:35 +000037
Hans Wennborg8f5b44a2019-07-18 11:51:05 +000038What's New in Clang 10.0.0?
39===========================
Sean Silvafe251442012-12-23 01:19:35 +000040
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
Hans Wennborg1fe469a2019-01-16 10:57:02 +000049- ...
Rafael Espindola34970692013-12-12 16:07:11 +000050
Sean Silvafe251442012-12-23 01:19:35 +000051Improvements to Clang's diagnostics
52^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
53
Richard Trieu6541c792019-09-21 02:37:10 +000054- -Wtautological-overlap-compare will warn on negative numbers and non-int
55 types.
Roman Lebedev61061d62018-04-07 10:39:21 +000056
Erich Keaneb0c78092017-07-26 18:04:45 +000057Non-comprehensive list of changes in this release
58-------------------------------------------------
59
Craig Topper635d3832019-09-11 23:54:36 +000060- For X86 target, -march=skylake-avx512, -march=icelake-client,
61 -march=icelake-server, -march=cascadelake, -march=cooperlake will default to
62 not using 512-bit zmm registers in vectorized code unless 512-bit intrinsics
63 are used in the source code. 512-bit operations are known to cause the CPUs
64 to run at a lower frequency which can impact performance. This behavior can be
65 changed by passing -mprefer-vector-width=512 on the command line.
Ilya Biryukov88aef522018-12-05 18:32:05 +000066
Sean Silvafe251442012-12-23 01:19:35 +000067New Compiler Flags
68------------------
69
Hans Wennborg7b852ea2018-01-03 15:49:39 +000070- ...
Aaron Ballman2b3bc4c2017-10-21 16:45:08 +000071
Joerg Sonnenbergerc9199682017-07-01 21:36:21 +000072Deprecated Compiler Flags
73-------------------------
74
75The following options are deprecated and ignored. They will be removed in
76future versions of Clang.
77
Craig Topper5a43fdd2019-08-29 18:09:02 +000078- -mmpx used to enable the __MPX__ preprocessor define for the Intel MPX
79 instructions. There were no MPX intrinsics.
80- -mno-mpx used to disable -mmpx and is the default behavior.
81
Hans Wennborgfbb21e02017-07-19 14:14:07 +000082- ...
Joerg Sonnenbergerc9199682017-07-01 21:36:21 +000083
Yuka Takahashiba900ab2018-03-07 11:34:02 +000084Modified Compiler Flags
85-----------------------
86
Eric Christopher030b17d2019-05-14 19:40:42 +000087- ...
Yuka Takahashiba900ab2018-03-07 11:34:02 +000088
Tyler Nowickidb2668a2014-06-18 00:51:32 +000089New Pragmas in Clang
Eugene Zelenkoad5684a2018-05-15 21:45:01 +000090--------------------
Tyler Nowickidb2668a2014-06-18 00:51:32 +000091
Hans Wennborg1fe469a2019-01-16 10:57:02 +000092- ...
Paul Robinsonf9ede1c2016-07-18 17:19:12 +000093
94Attribute Changes in Clang
95--------------------------
96
Hans Wennborgfbb21e02017-07-19 14:14:07 +000097- ...
Paul Robinsonf9ede1c2016-07-18 17:19:12 +000098
Hans Wennborg02dc0002014-08-05 00:21:23 +000099Windows Support
100---------------
101
Hans Wennborg8f5b44a2019-07-18 11:51:05 +0000102- ...
Hans Wennborg02dc0002014-08-05 00:21:23 +0000103
Renato Golinf2fcddb2013-12-13 09:27:34 +0000104C Language Changes in Clang
105---------------------------
106
Kristina Brooksc0eb8a92019-06-05 03:47:02 +0000107- ...
Renato Golinf2fcddb2013-12-13 09:27:34 +0000108
Sean Silvafe251442012-12-23 01:19:35 +0000109C11 Feature Support
110^^^^^^^^^^^^^^^^^^^
111
112...
113
114C++ Language Changes in Clang
115-----------------------------
116
Hans Wennborg7b852ea2018-01-03 15:49:39 +0000117- ...
Richard Smith8eb53c82016-05-05 18:40:37 +0000118
119C++1z Feature Support
Sean Silvafe251442012-12-23 01:19:35 +0000120^^^^^^^^^^^^^^^^^^^^^
121
122...
123
124Objective-C Language Changes in Clang
125-------------------------------------
126
Hans Wennborg8f5b44a2019-07-18 11:51:05 +0000127- ...
Sean Silvafe251442012-12-23 01:19:35 +0000128
Erik Schnetter489700d2013-11-11 06:36:33 +0000129OpenCL C Language Changes in Clang
130----------------------------------
131
Bill Wendling0a794a4b2013-11-20 10:13:37 +0000132...
Erik Schnetter489700d2013-11-11 06:36:33 +0000133
Richard Smith6822bd72018-10-26 19:26:45 +0000134ABI Changes in Clang
135--------------------
136
Craig Topper6c8a34e2019-09-06 06:02:13 +0000137- gcc passes vectors of __int128 in memory on X86-64. Clang historically
138 broke the vectors into multiple scalars using two 64-bit values for each
139 element. Clang now matches the gcc behavior on Linux and NetBSD. You can
140 switch back to old API behavior with flag: -fclang-abi-compat=9.0.
Richard Smith6822bd72018-10-26 19:26:45 +0000141
Alexey Bataev44b67502016-05-31 11:17:08 +0000142OpenMP Support in Clang
Shoaib Meenai5be71fa2019-03-04 21:19:53 +0000143-----------------------
Alexey Bataev44b67502016-05-31 11:17:08 +0000144
Hans Wennborg8f5b44a2019-07-18 11:51:05 +0000145- ...
Alexey Bataev44b67502016-05-31 11:17:08 +0000146
Jonas Hahnfeld8da9c2a2018-04-20 13:04:54 +0000147CUDA Support in Clang
148---------------------
149
Hans Wennborg8f5b44a2019-07-18 11:51:05 +0000150- ...
Jonas Hahnfeld8da9c2a2018-04-20 13:04:54 +0000151
Sean Silvafe251442012-12-23 01:19:35 +0000152Internal API Changes
153--------------------
154
Hans Wennborg8f5b44a2019-07-18 11:51:05 +0000155These are major API changes that have happened since the 9.0.0 release of
Sean Silvafe251442012-12-23 01:19:35 +0000156Clang. If upgrading an external codebase that uses Clang as a library,
157this section should help get you past the largest hurdles of upgrading.
158
Dmitri Gribenkob22804b2019-08-30 09:29:34 +0000159- libTooling APIs that transfer ownership of `FrontendAction` objects now pass
160 them by `unique_ptr`, making the ownership transfer obvious in the type
161 system. `FrontendActionFactory::create()` now returns a
162 `unique_ptr<FrontendAction>`. `runToolOnCode`, `runToolOnCodeWithArgs`,
163 `ToolInvocation::ToolInvocation()` now take a `unique_ptr<FrontendAction>`.
164
Shoaib Meenai5be71fa2019-03-04 21:19:53 +0000165Build System Changes
166--------------------
167
Hans Wennborg8f5b44a2019-07-18 11:51:05 +0000168These are major changes to the build system that have happened since the 9.0.0
Shoaib Meenai5be71fa2019-03-04 21:19:53 +0000169release of Clang. Users of the build system should adjust accordingly.
170
171- In 8.0.0 and below, the install-clang-headers target would install clang's
172 resource directory headers. This installation is now performed by the
173 install-clang-resource-headers target. Users of the old install-clang-headers
Shoaib Meenai20e7c0c2019-03-11 18:53:57 +0000174 target should switch to the new install-clang-resource-headers target. The
175 install-clang-headers target now installs clang's API headers (corresponding
176 to its libraries), which is consistent with the install-llvm-headers target.
Shoaib Meenai5be71fa2019-03-04 21:19:53 +0000177
Chris Bienemana80a3a2b2019-08-14 16:49:52 +0000178- In 9.0.0 and later Clang added a new target, clang-cpp, which generates a
179 shared library comprised of all the clang component libraries and exporting
180 the clang C++ APIs. Additionally the build system gained the new
181 "CLANG_LINK_CLANG_DYLIB" option, which defaults Off, and when set to On, will
182 force clang (and clang-based tools) to link the clang-cpp library instead of
183 statically linking clang's components. This option will reduce the size of
184 binary distributions at the expense of compiler performance.
185
186- ...
Richard Smitha0334a92015-05-14 00:22:12 +0000187
Aaron Ballmancdc43af2015-09-17 13:47:22 +0000188AST Matchers
189------------
Aaron Ballmancdc43af2015-09-17 13:47:22 +0000190
Paul Hoadccc6f832019-03-22 22:47:34 +0000191- ...
Sylvestre Ledru72e3fa72017-03-14 09:43:55 +0000192
193clang-format
194------------
195
Hans Wennborg8f5b44a2019-07-18 11:51:05 +0000196- ...
Sylvestre Ledruc9410392017-12-05 09:23:47 +0000197
Ted Kremenek3a2291b2013-04-24 07:33:52 +0000198libclang
199--------
200
Hans Wennborg8f5b44a2019-07-18 11:51:05 +0000201- ...
Ted Kremenek3a2291b2013-04-24 07:33:52 +0000202
Sylvestre Ledruea49d3a2016-08-06 20:23:54 +0000203
Anna Zaksb6219a92013-04-25 23:14:38 +0000204Static Analyzer
Ted Kremenek004e8232013-04-26 00:01:34 +0000205---------------
Anna Zaksb6219a92013-04-25 23:14:38 +0000206
Hans Wennborg8f5b44a2019-07-18 11:51:05 +0000207- ...
Ted Kremenek004e8232013-04-26 00:01:34 +0000208
Roman Lebedevb69ba222018-07-30 18:58:30 +0000209.. _release-notes-ubsan:
210
Vedant Kumar840c2c72017-06-13 02:52:31 +0000211Undefined Behavior Sanitizer (UBSan)
212------------------------------------
213
Hans Wennborg1fe469a2019-01-16 10:57:02 +0000214- ...
Roman Lebedevbd1c0872019-01-15 09:44:25 +0000215
Ted Kremenek004e8232013-04-26 00:01:34 +0000216Core Analysis Improvements
217==========================
218
Bill Wendling61f44cc2013-06-04 06:17:46 +0000219- ...
Ted Kremenek004e8232013-04-26 00:01:34 +0000220
221New Issues Found
222================
223
Bill Wendling61f44cc2013-06-04 06:17:46 +0000224- ...
Anna Zaksb6219a92013-04-25 23:14:38 +0000225
Sean Silvafe251442012-12-23 01:19:35 +0000226Python Binding Changes
227----------------------
228
229The following methods have been added:
230
231- ...
232
233Significant Known Problems
234==========================
235
236Additional Information
237======================
238
239A wide variety of additional information is available on the `Clang web
Hans Wennborg0aa0d912018-09-10 08:51:25 +0000240page <https://clang.llvm.org/>`_. The web page contains versions of the
Sean Silvafe251442012-12-23 01:19:35 +0000241API documentation which are up-to-date with the Subversion version of
242the source code. You can access versions of these documents specific to
243this release by going into the "``clang/docs/``" directory in the Clang
244tree.
245
246If you have any questions or comments about Clang, please feel free to
247contact us via the `mailing
Hans Wennborg0aa0d912018-09-10 08:51:25 +0000248list <https://lists.llvm.org/mailman/listinfo/cfe-dev>`_.