diff options
Diffstat (limited to 'docs/ReleaseNotes.rst')
-rw-r--r-- | docs/ReleaseNotes.rst | 237 |
1 files changed, 167 insertions, 70 deletions
diff --git a/docs/ReleaseNotes.rst b/docs/ReleaseNotes.rst index c6dc6aa..2941afd 100644 --- a/docs/ReleaseNotes.rst +++ b/docs/ReleaseNotes.rst @@ -1,6 +1,6 @@ -===================================== -Clang 3.7 (In-Progress) Release Notes -===================================== +======================= +Clang 3.7 Release Notes +======================= .. contents:: :local: @@ -8,11 +8,6 @@ Clang 3.7 (In-Progress) Release Notes Written by the `LLVM Team <http://llvm.org/>`_ -.. warning:: - - These are in-progress notes for the upcoming Clang 3.7 release. You may - prefer the `Clang 3.6 Release Notes - <http://llvm.org/releases/3.6.0/tools/clang/docs/ReleaseNotes.html>`_. Introduction ============ @@ -31,11 +26,6 @@ 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>`_. -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 3.7? ======================== @@ -52,14 +42,48 @@ Major New Features extension is also enabled when compiling CUDA code, but its use should be viewed as an implementation detail that is subject to change. +- On Windows targets, some uses of the ``__try``, ``__except``, and + ``__finally`` language constructs are supported in Clang 3.7. MSVC-compatible + C++ exceptions are not yet supported, however. + +- Clang 3.7 fully supports OpenMP 3.1 and reported to work on many platforms, + including x86, x86-64 and Power. Also, pragma ``omp simd`` from OpenMP 4.0 is + supported as well. See below for details. + +- Clang 3.7 includes an implementation of :doc:`control flow integrity + <ControlFlowIntegrity>`, a security hardening mechanism. + + Improvements to Clang's diagnostics -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +----------------------------------- Clang's diagnostics are constantly being improved to catch more issues, explain them more clearly, and provide more accurate source information -about them. The improvements since the 3.5 release include: +about them. The improvements since the 3.6 release include: + +- -Wrange-loop-analysis analyzes the loop variable type and the container type + to determine whether copies are made of the container elements. If possible, + suggest a const reference type to prevent copies, or a non-reference type + to indicate a copy is made. + +- -Wredundant-move warns when a parameter variable is moved on return and the + return type is the same as the variable. Returning the variable directly + will already make a move, so the call is not needed. + +- -Wpessimizing-move warns when a local variable is moved on return and the + return type is the same as the variable. Copy elision cannot take place with + a move, but can take place if the variable is returned directly. + +- -Wmove is a new warning group which has the previous two warnings, + -Wredundant-move and -Wpessimizing-move, as well as previous warning + -Wself-move. In addition, this group is part of -Wmost and -Wall now. -- ... +- -Winfinite-recursion, a warning for functions that only call themselves, + is now part of -Wmost and -Wall. + +- -Wobjc-circular-container prevents creation of circular containers, + it covers ``NSMutableArray``, ``NSMutableSet``, ``NSMutableDictionary``, + ``NSMutableOrderedSet`` and all their subclasses. New Compiler Flags ------------------ @@ -69,94 +93,167 @@ The sized deallocation feature of C++14 is now controlled by the isn't yet widely deployed, so the user must supply an extra flag to get the extra functionality. -The option .... +Objective-C Language Changes in Clang +------------------------------------- + +- ``objc_boxable`` attribute was added. Structs and unions marked with this attribute can be + used with boxed expressions (``@(...)``) to create ``NSValue``. + +Profile Guided Optimization +--------------------------- + +Clang now accepts GCC-compatible flags for profile guided optimization (PGO). +You can now use ``-fprofile-generate=<dir>``, ``-fprofile-use=<dir>``, +``-fno-profile-generate`` and ``-fno-profile-use``. These flags have the +same semantics as their GCC counterparts. However, the generated profile +is still LLVM-specific. PGO profiles generated with Clang cannot be used +by GCC and vice-versa. + +Clang now emits function entry counts in profile-instrumented binaries. +This has improved the computation of weights and frequencies in +profile analysis. + +OpenMP Support +-------------- +OpenMP 3.1 is fully supported, but disabled by default. To enable it, please use +the ``-fopenmp=libomp`` command line option. Your feedback (positive or negative) on +using OpenMP-enabled clang would be much appreciated; please share it either on +`cfe-dev <http://lists.llvm.org/mailman/listinfo/cfe-dev>`_ or `openmp-dev +<http://lists.llvm.org/mailman/listinfo/openmp-dev>`_ mailing lists. + +In addition to OpenMP 3.1, several important elements of the 4.0 version of the +standard are supported as well: + +- ``omp simd``, ``omp for simd`` and ``omp parallel for simd`` pragmas +- atomic constructs +- ``proc_bind`` clause of ``omp parallel`` pragma +- ``depend`` clause of ``omp task`` pragma (except for array sections) +- ``omp cancel`` and ``omp cancellation point`` pragmas +- ``omp taskgroup`` pragma + +Internal API Changes +-------------------- + +These are major API changes that have happened since the 3.6 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. -New Pragmas in Clang ------------------------ +- Some of the ``PPCallbacks`` interface now deals in ``MacroDefinition`` + objects instead of ``MacroDirective`` objects. This allows preserving + full information on macros imported from modules. -Clang now supports the ... +- ``clang-c/Index.h`` no longer ``#include``\s ``clang-c/Documentation.h``. + You now need to explicitly ``#include "clang-c/Documentation.h"`` if + you use the libclang documentation API. -Windows Support +Static Analyzer --------------- -Clang's support for building native Windows programs ... +* The generated plists now contain the name of the check that generated it. +* Configuration options can now be passed to the checkers (not just the static + analyzer core). -C Language Changes in Clang ---------------------------- +* New check for dereferencing object that the result of a zero-length + allocation. -... +* Also check functions in precompiled headers. -C11 Feature Support -^^^^^^^^^^^^^^^^^^^ +* Properly handle alloca() in some checkers. -... +* Various improvements to the retain count checker. -C++ Language Changes in Clang ------------------------------ -- ... +clang-tidy +---------- +Added new checks: -C++11 Feature Support -^^^^^^^^^^^^^^^^^^^^^ +* google-global-names-in-headers: flag global namespace pollution in header + files. -... +* misc-assert-side-effect: detects ``assert()`` conditions with side effects + which can cause different behavior in debug / release builds. -Objective-C Language Changes in Clang -------------------------------------- +* misc-assign-operator-signature: finds declarations of assign operators with + the wrong return and/or argument types. -... +* misc-inaccurate-erase: warns when some elements of a container are not + removed due to using the ``erase()`` algorithm incorrectly. -OpenCL C Language Changes in Clang ----------------------------------- +* misc-inefficient-algorithm: warns on inefficient use of STL algorithms on + associative containers. -... +* misc-macro-parentheses: finds macros that can have unexpected behavior due + to missing parentheses. -Internal API Changes --------------------- +* misc-macro-repeated-side-effects: checks for repeated argument with side + effects in macros. -These are major API changes that have happened since the 3.6 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. +* misc-noexcept-move-constructor: flags user-defined move constructors and + assignment operators not marked with ``noexcept`` or marked with + ``noexcept(expr)`` where ``expr`` evaluates to ``false`` (but is not a + ``false`` literal itself). -- Some of the `PPCallbacks` interface now deals in `MacroDefinition` - objects instead of `MacroDirective` objects. This allows preserving - full information on macros imported from modules. +* misc-static-assert: replaces ``assert()`` with ``static_assert()`` if the + condition is evaluable at compile time. -- `clang-c/Index.h` no longer `#include`\s `clang-c/Documentation.h`. - You now need to explicitly `#include "clang-c/Documentation.h"` if - you use the libclang documentation API. +* readability-container-size-empty: checks whether a call to the ``size()`` + method can be replaced with a call to ``empty()``. -libclang --------- +* readability-else-after-return: flags conditional statements having the + ``else`` branch, when the ``true`` branch has a ``return`` as the last statement. -... +* readability-redundant-string-cstr: finds unnecessary calls to + ``std::string::c_str()``. -Static Analyzer ---------------- +* readability-shrink-to-fit: replaces copy and swap tricks on shrinkable + containers with the ``shrink_to_fit()`` method call. + +* readability-simplify-boolean-expr: looks for boolean expressions involving + boolean constants and simplifies them to use the appropriate boolean + expression directly (``if (x == true) ... -> if (x)``, etc.) -... +SystemZ +------- -Core Analysis Improvements -========================== +* Clang will now always default to the z10 processor when compiling + without any ``-march=`` option. Previous releases used to automatically + detect the current host CPU when compiling natively. If you wish to + still have clang detect the current host CPU, you now need to use the + ``-march=native`` option. -- ... +* Clang now provides the ``<s390intrin.h>`` header file. -New Issues Found -================ +* Clang now supports the transactional-execution facility and + provides associated builtins and the ``<htmintrin.h>`` and + ``<htmxlintrin.h>`` header files. Support is enabled by default + on zEC12 and above, and can additionally be enabled or disabled + via the ``-mhtm`` / ``-mno-htm`` command line options. -- ... +* Clang now supports the vector facility. This includes a + change in the ABI to pass arguments and return values of + vector types in vector registers, as well as a change in + the default alignment of vector types. Support is enabled + by default on z13 and above, and can additionally be enabled + or disabled via the ``-mvx`` / ``-mno-vx`` command line options. -Python Binding Changes ----------------------- +* Clang now supports the System z vector language extension, + providing a "vector" keyword to define vector types, and a + set of builtins defined in the ``<vecintrin.h>`` header file. + This can be enabled via the ``-fzvector`` command line option. + For compatibility with GCC, Clang also supports the + ``-mzvector`` option as an alias. + +* Several cases of ABI incompatibility with GCC have been fixed. -The following methods have been added: -- ... +Last release which will run on Windows XP and Windows Vista +----------------------------------------------------------- -Significant Known Problems -========================== +This is expected to the be the last major release of Clang that will support +running on Windows XP and Windows Vista. For the next major release the +minimum Windows version requirement will be Windows 7. Additional Information ====================== @@ -170,4 +267,4 @@ tree. If you have any questions or comments about Clang, please feel free to contact us via the `mailing -list <http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev>`_. +list <http://lists.llvm.org/mailman/listinfo/cfe-dev>`_. |