llvm-project/clang/docs/ReleaseNotes.rst

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

217 lines
5.5 KiB
ReStructuredText
Raw Normal View History

===========================================
Clang |release| |ReleaseNotesTitle|
===========================================
.. contents::
:local:
:depth: 2
Written by the `LLVM Team <https://llvm.org/>`_
.. only:: PreRelease
.. warning::
These are in-progress notes for the upcoming Clang |version| release.
Release notes for previous releases can be found on
`the Releases Page <https://llvm.org/releases/>`_.
Introduction
============
This document contains the release notes for the Clang C/C++/Objective-C
frontend, part of the LLVM Compiler Infrastructure, release |release|. Here we
describe the status of Clang in some detail, including major
improvements from the previous release and new feature work. For the
general LLVM release notes, see `the LLVM
documentation <https://llvm.org/docs/ReleaseNotes.html>`_. For the libc++ release notes,
see `this page <https://libcxx.llvm.org/ReleaseNotes.html>`_. All LLVM releases
may be downloaded from the `LLVM releases web site <https://llvm.org/releases/>`_.
For more information about Clang or LLVM, including information about the
latest release, please see the `Clang Web Site <https://clang.llvm.org>`_ or the
`LLVM Web Site <https://llvm.org>`_.
Potentially Breaking Changes
============================
These changes are ones which we think may surprise users when upgrading to
Clang |release| because of the opportunity they pose for disruption to existing
code bases.
C/C++ Language Potentially Breaking Changes
-------------------------------------------
C++ Specific Potentially Breaking Changes
-----------------------------------------
ABI Changes in This Version
---------------------------
What's New in Clang |release|?
==============================
Some of the major new features and improvements to Clang are listed
here. Generic improvements to Clang as a whole or to its underlying
infrastructure are described first, followed by language-specific
sections with improvements to Clang's support for those languages.
C++ Language Changes
--------------------
C++20 Feature Support
^^^^^^^^^^^^^^^^^^^^^
C++23 Feature Support
^^^^^^^^^^^^^^^^^^^^^
C++2c Feature Support
^^^^^^^^^^^^^^^^^^^^^
Resolutions to C++ Defect Reports
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
C Language Changes
------------------
C2x Feature Support
^^^^^^^^^^^^^^^^^^^
Non-comprehensive list of changes in this release
-------------------------------------------------
New Compiler Flags
------------------
[Driver] Add -dumpdir and change -gsplit-dwarf .dwo names for linking When the final phase is linking, Clang currently places `.dwo` files in the current directory (like the `-c` behavior for multiple inputs). Strangely, -fdebug-compilation-dir=/-ffile-compilation-dir= is considered, which is untested. GCC has a more useful behavior that derives auxiliary filenames from the final output (-o). ``` gcc -c -g -gsplit-dwarf d/a.c d/b.c # a.dwo b.dwo gcc -g -gsplit-dwarf d/a.c d/b.c -o e/x # e/x-a.dwo e/x-b.dwo gcc -g -gsplit-dwarf d/a.c d/b.c # a-a.dwo a-b.dwo ``` Port a useful subset of GCC behaviors that are easy to describe to Clang. * Add a driver and cc1 option -dumpdir * When the final phase is link, add a default -dumpdir if not specified by the user * Forward -dumpdir to -cc1 command lines * tools::SplitDebugName prefers -dumpdir when constructing the .dwo filename GCC provides -dumpbase. If we use just one of -dumpdir and -dumpbase, -dumpbase isn't very useful as it appends a dash. ``` gcc -g -gsplit-dwarf -dumpdir e d/a.c # ea.dwo gcc -g -gsplit-dwarf -dumpdir e/ d/a.c # e/a.dwo gcc -g -gsplit-dwarf -dumpbase e d/a.c # e-a.dwo gcc -g -gsplit-dwarf -dumpbase e/ d/a.c # e/-a.dwo ``` If we specify both `-dumpdir` and `-dumpbase`, we can avoid the influence of the source filename when there is one input file. ``` gcc -g -gsplit-dwarf -dumpdir f/ -dumpbase x d/a.c # f/x.dwo gcc -g -gsplit-dwarf -dumpdir f/ -dumpbase x d/a.c d/b.c # f/x-a.dwo f/x-b.dwo ``` Given the above examples, I think -dumpbase is not useful. GCC -save-temps has interesting interaction with -dumpdir as -save-temps generated files are considered auxiliary files like .dwo files. For Clang, with this patch, -save-temps and -dumpdir are orthogonal, which is easier to explain. ``` gcc -g -gsplit-dwarf d/a.c -o e/x -dumpdir f/ -save-temps=obj # e/a.{i,s,o,dwo} gcc -g -gsplit-dwarf d/a.c -o e/x -save-temps=obj -dumpdir f/ # f/a.{i,s,o,dwo} clang -g -gsplit-dwarf d/a.c -o e/x -save-temps=obj -dumpdir f/ # e/a.{i,s,o} f/a.dwo ``` Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D149193
2023-05-09 14:43:46 -07:00
Deprecated Compiler Flags
-------------------------
Modified Compiler Flags
-----------------------
Removed Compiler Flags
-------------------------
Attribute Changes in Clang
--------------------------
Improvements to Clang's diagnostics
-----------------------------------
Bug Fixes in This Version
-------------------------
- Fixed an issue where a class template specialization whose declaration is
instantiated in one module and whose definition is instantiated in another
module may end up with members associated with the wrong declaration of the
class, which can result in miscompiles in some cases.
Bug Fixes to Compiler Builtins
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Bug Fixes to Attribute Support
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Bug Fixes to C++ Support
^^^^^^^^^^^^^^^^^^^^^^^^
- Clang limits the size of arrays it will try to evaluate at compile time
to avoid memory exhaustion.
This limit can be modified by `-fconstexpr-steps`.
(`#63562 <https://github.com/llvm/llvm-project/issues/63562>`_)
- Fix a crash caused by some named unicode escape sequences designating
a Unicode character whose name contains a ``-``.
(`Fixes #64161 <https://github.com/llvm/llvm-project/issues/64161>_`)
- Fix cases where we ignore ambiguous name lookup when looking up memebers.
(`#22413 <https://github.com/llvm/llvm-project/issues/22413>_`),
(`#29942 <https://github.com/llvm/llvm-project/issues/29942>_`),
(`#35574 <https://github.com/llvm/llvm-project/issues/35574>_`) and
(`#27224 <https://github.com/llvm/llvm-project/issues/27224>_`).
Bug Fixes to AST Handling
^^^^^^^^^^^^^^^^^^^^^^^^^
Miscellaneous Bug Fixes
^^^^^^^^^^^^^^^^^^^^^^^
Miscellaneous Clang Crashes Fixed
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Target Specific Changes
-----------------------
AMDGPU Support
^^^^^^^^^^^^^^
X86 Support
^^^^^^^^^^^
Arm and AArch64 Support
^^^^^^^^^^^^^^^^^^^^^^^
Windows Support
^^^^^^^^^^^^^^^
LoongArch Support
^^^^^^^^^^^^^^^^^
- The ``-march=native`` ``-mtune=`` options and ``__loongarch_{arch,tune}``
macros are now supported.
RISC-V Support
^^^^^^^^^^^^^^
2022-08-18 14:39:37 -07:00
CUDA/HIP Language Changes
^^^^^^^^^^^^^^^^^^^^^^^^^
CUDA Support
^^^^^^^^^^^^
AIX Support
^^^^^^^^^^^
WebAssembly Support
^^^^^^^^^^^^^^^^^^^
AVR Support
^^^^^^^^^^^
DWARF Support in Clang
----------------------
Floating Point Support in Clang
-------------------------------
AST Matchers
------------
clang-format
------------
libclang
--------
Static Analyzer
---------------
.. _release-notes-sanitizers:
Sanitizers
----------
Python Binding Changes
----------------------
Additional Information
======================
A wide variety of additional information is available on the `Clang web
page <https://clang.llvm.org/>`_. The web page contains versions of the
2020-03-22 22:18:40 +01:00
API documentation which are up-to-date with the Git version of
the source code. You can access versions of these documents specific to
this release by going into the "``clang/docs/``" directory in the Clang
tree.
If you have any questions or comments about Clang, please feel free to
contact us on the `Discourse forums (Clang Frontend category)
<https://discourse.llvm.org/c/clang/6>`_.