diff options
Diffstat (limited to 'docs/ReleaseNotes.rst')
-rw-r--r-- | docs/ReleaseNotes.rst | 251 |
1 files changed, 140 insertions, 111 deletions
diff --git a/docs/ReleaseNotes.rst b/docs/ReleaseNotes.rst index 3278bcc03381..f7e31e5c98d5 100644 --- a/docs/ReleaseNotes.rst +++ b/docs/ReleaseNotes.rst @@ -1,6 +1,6 @@ -========================= -Clang 4.0.0 Release Notes -========================= +======================================= +Clang 5.0.0 (In-Progress) Release Notes +======================================= .. contents:: :local: @@ -8,11 +8,17 @@ Clang 4.0.0 Release Notes Written by the `LLVM Team <http://llvm.org/>`_ +.. warning:: + + These are in-progress notes for the upcoming Clang 5 release. + Release notes for previous releases can be found on + `the Download Page <http://releases.llvm.org/download.html>`_. + Introduction ============ -This document contains the release notes for the Clang C/C++/Objective-C/OpenCL -frontend, part of the LLVM Compiler Infrastructure, release 4.0.0. Here we +This document contains the release notes for the Clang C/C++/Objective-C +frontend, part of the LLVM Compiler Infrastructure, release 5.0.0. 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 @@ -25,7 +31,12 @@ the latest release, please check out the main please see the `Clang Web Site <http://clang.llvm.org>`_ or the `LLVM Web Site <http://llvm.org>`_. -What's New in Clang 4.0.0? +Note that if you are reading this file from a Subversion checkout or the +main Clang web page, this document applies to the *next* release, not +the current one. To see the release notes for a specific release, please +see the `releases page <http://llvm.org/releases/>`_. + +What's New in Clang 5.0.0? ========================== Some of the major new features and improvements to Clang are listed @@ -36,147 +47,165 @@ sections with improvements to Clang's support for those languages. Major New Features ------------------ -- The `diagnose_if <AttributeReference.html#diagnose-if>`_ attribute has been - added to clang. This attribute allows - clang to emit a warning or error if a function call meets one or more - user-specified conditions. - -- Enhanced devirtualization with - `-fstrict-vtable-pointers <UsersManual.html#cmdoption-fstrict-vtable-pointers>`_. - Clang devirtualizes across different basic blocks, like loops: - - .. code-block:: c++ - - struct A { - virtual void foo(); - }; - void indirect(A &a, int n) { - for (int i = 0 ; i < n; i++) - a.foo(); - } - void test(int n) { - A a; - indirect(a, n); - } - - -Improvements to ThinLTO (-flto=thin) ------------------------------------- -- Integration with profile data (PGO). When available, profile data enables - more accurate function importing decisions, as well as cross-module indirect - call promotion. -- Significant build-time and binary-size improvements when compiling with debug - info (``-g``). +- ... + +Improvements to Clang's diagnostics +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- -Wunused-lambda-capture warns when a variable explicitly captured + by a lambda is not used in the body of the lambda. New Compiler Flags ------------------ -- The option ``-Og`` has been added to optimize the debugging experience. - For now, this option is exactly the same as ``-O1``. However, in the future, - some other optimizations might be enabled or disabled. +The option .... + +New Pragmas in Clang +----------------------- + +Clang now supports the ... + + +Attribute Changes in Clang +-------------------------- + +- ... + +Windows Support +--------------- + +Clang's support for building native Windows programs ... + + +C Language Changes in Clang +--------------------------- + +- ... -- The option ``-MJ`` has been added to simplify adding JSON compilation - database output into existing build systems. +... +C11 Feature Support +^^^^^^^^^^^^^^^^^^^ + +... + +C++ Language Changes in Clang +----------------------------- + +... + +C++1z Feature Support +^^^^^^^^^^^^^^^^^^^^^ + +... + +Objective-C Language Changes in Clang +------------------------------------- + +... OpenCL C Language Changes in Clang ---------------------------------- -**The following bugs in the OpenCL header have been fixed:** +... + +OpenMP Support in Clang +---------------------------------- + +... -* Added missing ``overloadable`` and ``convergent`` attributes. -* Removed some erroneous extra ``native_*`` functions. +Internal API Changes +-------------------- -**The following bugs in the generation of metadata have been fixed:** +These are major API changes that have happened since the 4.0.0 release of +Clang. If upgrading an external codebase that uses Clang as a library, +this section should help get you past the largest hurdles of upgrading. -* Corrected the SPIR version depending on the OpenCL version. -* Source level address spaces are taken from the SPIR specification. -* Image types now contain no access qualifier. +- ... -**The following bugs in the AMD target have been fixed:** +AST Matchers +------------ -* Corrected the bitwidth of ``size_t`` and NULL pointer value with respect to - address spaces. -* Added ``cl_khr_subgroups``, ``cl_amd_media_ops`` and ``cl_amd_media_ops2`` - extensions. -* Added ``cl-denorms-are-zero`` support. -* Changed address spaces for image objects to be ``constant``. -* Added little-endian. +... -**The following bugs in OpenCL 2.0 have been fixed:** -* Fixed pipe builtin function return type, added extra argument to generated - IR intrinsics to propagate size and alignment information of the pipe packed - type. -* Improved pipe type to accommodate access qualifiers. -* Added correct address space to the ObjC block generation and ``enqueue_kernel`` - prototype. -* Improved handling of integer parameters of ``enqueue_kernel`` prototype. We - now allow ``size_t`` instead of ``int`` for specifying block parameter sizes. -* Allow using NULL (aka ``CLK_NULL_QUEUE``) with ``queue_t``. +clang-format +------------ +* Option **BreakBeforeInheritanceComma** added to break before ``:`` and ``,`` in case of + multiple inheritance in a class declaration. Enabled by default in the Mozilla coding style. -**Improved the following diagnostics:** + +---------------------+----------------------------------------+ + | true | false | + +=====================+========================================+ + | .. code-block:: c++ | .. code-block:: c++ | + | | | + | class MyClass | class MyClass : public X, public Y { | + | : public X | }; | + | , public Y { | | + | }; | | + +---------------------+----------------------------------------+ -* Disallow address spaces other than ``global`` for kernel pointer parameters. -* Correct the use of half type argument and pointer assignment with - dereferencing. -* Disallow variadic arguments in functions and blocks. -* Allow partial initializer for array and struct. +* Align block comment decorations. -**Some changes to OpenCL extensions have been made:** + +----------------------+---------------------+ + | Before | After | + +======================+=====================+ + | .. code-block:: c++ | .. code-block:: c++ | + | | | + | /* line 1 | /* line 1 | + | * line 2 | * line 2 | + | */ | */ | + +----------------------+---------------------+ -* Added ``cl_khr_mipmap_image``. -* Added ``-cl-ext`` flag to allow overwriting supported extensions otherwise - set by the target compiled for (Example: ``-cl-ext=-all,+cl_khr_fp16``). -* New types and functions can now be flexibly added to extensions using the - following pragmas instead of modifying the Clang source code: +* The :doc:`ClangFormatStyleOptions` documentation provides detailed examples for most options. - .. code-block:: c +* Namespace end comments are now added or updated automatically. - #pragma OPENCL EXTENSION the_new_extension_name : begin - // declare types and functions associated with the extension here - #pragma OPENCL EXTENSION the_new_extension_name : end + +---------------------+---------------------+ + | Before | After | + +=====================+=====================+ + | .. code-block:: c++ | .. code-block:: c++ | + | | | + | namespace A { | namespace A { | + | int i; | int i; | + | int j; | int j; | + | } | } | + +---------------------+---------------------+ +* Comment reflow support added. Overly long comment lines will now be reflown with the rest of + the paragraph instead of just broken. Option **ReflowComments** added and enabled by default. -**Miscellaneous changes:** +libclang +-------- -* Fix ``__builtin_astype`` to cast between different address space objects. -* Allow using ``opencl_unroll_hint`` with earlier OpenCL versions than 2.0. -* Improved handling of floating point literal to default to single precision if - fp64 extension is not enabled. -* Refactor ``sampler_t`` implementation to simplify initializer representation - which is now handled as a compiler builtin function with an integer value - passed into it. -* Change fake address space map to use the SPIR convention. -* Added `the OpenCL manual <UsersManual.html#opencl-features>`_ to Clang - documentation. +... Static Analyzer --------------- -With the option ``--show-description``, scan-build's list of defects will also -show the description of the defects. +... + +Core Analysis Improvements +========================== + +- ... + +New Issues Found +================ -The analyzer now provides better support of code that uses gtest. +- ... -Several new checks were added: +Python Binding Changes +---------------------- -- The analyzer warns when virtual calls are made from constructors or - destructors. This check is off by default but can be enabled by passing the - following command to scan-build: ``-enable-checker optin.cplusplus.VirtualCall``. -- The analyzer checks for synthesized copy properties of mutable types in - Objective C, such as ``NSMutableArray``. Calling the setter for these properties - will store an immutable copy of the value. -- The analyzer checks for calls to ``dispatch_once()`` that use an Objective-C - instance variable as the predicate. Using an instance variable as a predicate - may result in the passed-in block being executed multiple times or not at all. - These calls should be rewritten either to use a lock or to store the predicate - in a global or static variable. -- The analyzer checks for unintended comparisons of ``NSNumber``, ``CFNumberRef``, and - other Cocoa number objects to scalar values. +The following methods have been added: +- ... + +Significant Known Problems +========================== Additional Information ====================== |