diff options
Diffstat (limited to 'docs/ReleaseNotes.rst')
-rw-r--r-- | docs/ReleaseNotes.rst | 294 |
1 files changed, 114 insertions, 180 deletions
diff --git a/docs/ReleaseNotes.rst b/docs/ReleaseNotes.rst index 2941afd..779d45c 100644 --- a/docs/ReleaseNotes.rst +++ b/docs/ReleaseNotes.rst @@ -1,6 +1,6 @@ -======================= -Clang 3.7 Release Notes -======================= +===================================== +Clang 3.8 (In-Progress) Release Notes +===================================== .. contents:: :local: @@ -8,12 +8,17 @@ Clang 3.7 Release Notes Written by the `LLVM Team <http://llvm.org/>`_ +.. warning:: + + These are in-progress notes for the upcoming Clang 3.8 release. You may + prefer the `Clang 3.7 Release Notes + <http://llvm.org/releases/3.7.0/tools/clang/docs/ReleaseNotes.html>`_. Introduction ============ This document contains the release notes for the Clang C/C++/Objective-C -frontend, part of the LLVM Compiler Infrastructure, release 3.7. Here we +frontend, part of the LLVM Compiler Infrastructure, release 3.8. 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 @@ -26,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 3.7? +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.8? ======================== Some of the major new features and improvements to Clang are listed @@ -37,223 +47,147 @@ sections with improvements to Clang's support for those languages. Major New Features ------------------ -- Use of the ``__declspec`` language extension for declaration attributes now - requires passing the -fms-extensions or -fborland compiler flag. This language - 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. - +- Feature1... 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.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. +about them. The improvements since the 3.7 release include: -- -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 ------------------ -The sized deallocation feature of C++14 is now controlled by the -``-fsized-deallocation`` flag. This feature relies on library support that -isn't yet widely deployed, so the user must supply an extra flag to get the -extra functionality. - - -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 +The option .... -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. -- Some of the ``PPCallbacks`` interface now deals in ``MacroDefinition`` - objects instead of ``MacroDirective`` objects. This allows preserving - full information on macros imported from modules. +New Pragmas in Clang +----------------------- -- ``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. +Clang now supports the ... -Static Analyzer +Windows Support --------------- -* 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). - -* New check for dereferencing object that the result of a zero-length - allocation. - -* Also check functions in precompiled headers. - -* Properly handle alloca() in some checkers. +Clang's support for building native Windows programs ... -* Various improvements to the retain count checker. +C Language Changes in Clang +--------------------------- -clang-tidy ----------- -Added new checks: +... -* google-global-names-in-headers: flag global namespace pollution in header - files. +C11 Feature Support +^^^^^^^^^^^^^^^^^^^ -* misc-assert-side-effect: detects ``assert()`` conditions with side effects - which can cause different behavior in debug / release builds. +... -* misc-assign-operator-signature: finds declarations of assign operators with - the wrong return and/or argument types. +C++ Language Changes in Clang +----------------------------- -* misc-inaccurate-erase: warns when some elements of a container are not - removed due to using the ``erase()`` algorithm incorrectly. +- ... -* misc-inefficient-algorithm: warns on inefficient use of STL algorithms on - associative containers. +C++11 Feature Support +^^^^^^^^^^^^^^^^^^^^^ -* misc-macro-parentheses: finds macros that can have unexpected behavior due - to missing parentheses. +... -* misc-macro-repeated-side-effects: checks for repeated argument with side - effects in macros. +Objective-C Language Changes in Clang +------------------------------------- -* 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). +... -* misc-static-assert: replaces ``assert()`` with ``static_assert()`` if the - condition is evaluable at compile time. +OpenCL C Language Changes in Clang +---------------------------------- -* readability-container-size-empty: checks whether a call to the ``size()`` - method can be replaced with a call to ``empty()``. +... -* readability-else-after-return: flags conditional statements having the - ``else`` branch, when the ``true`` branch has a ``return`` as the last statement. +Internal API Changes +-------------------- -* readability-redundant-string-cstr: finds unnecessary calls to - ``std::string::c_str()``. +These are major API changes that have happened since the 3.7 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. -* readability-shrink-to-fit: replaces copy and swap tricks on shrinkable - containers with the ``shrink_to_fit()`` method call. +- ... + +AST Matchers +------------ +The AST matcher functions were renamed to reflect the exact AST node names, +which is a breaking change to AST matching code. The following matchers were +affected: + +======================= ============================ +Previous Matcher Name New Matcher Name +======================= ============================ +recordDecl recordDecl and cxxRecordDecl +ctorInitializer cxxCtorInitializer +constructorDecl cxxConstructorDecl +destructorDecl cxxDestructorDecl +methodDecl cxxMethodDecl +conversionDecl cxxConversionDecl +memberCallExpr cxxMemberCallExpr +constructExpr cxxConstructExpr +unresolvedConstructExpr cxxUnresolvedConstructExpr +thisExpr cxxThisExpr +bindTemporaryExpr cxxBindTemporaryExpr +newExpr cxxNewExpr +deleteExpr cxxDeleteExpr +defaultArgExpr cxxDefaultArgExpr +operatorCallExpr cxxOperatorCallExpr +forRangeStmt cxxForRangeStmt +catchStmt cxxCatchStmt +tryStmt cxxTryStmt +throwExpr cxxThrowExpr +boolLiteral cxxBoolLiteral +nullPtrLiteralExpr cxxNullPtrLiteralExpr +reinterpretCastExpr cxxReinterpretCastExpr +staticCastExpr cxxStaticCastExpr +dynamicCastExpr cxxDynamicCastExpr +constCastExpr cxxConstCastExpr +functionalCastExpr cxxFunctionalCastExpr +temporaryObjectExpr cxxTemporaryObjectExpr +CUDAKernalCallExpr cudaKernelCallExpr +======================= ============================ + +recordDecl() previously matched AST nodes of type CXXRecordDecl, but now +matches AST nodes of type RecordDecl. If a CXXRecordDecl is required, use the +cxxRecordDecl() matcher instead. + +... + +libclang +-------- + +... -* 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.) +Static Analyzer +--------------- -SystemZ -------- +... -* 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. +Core Analysis Improvements +========================== -* Clang now provides the ``<s390intrin.h>`` header file. +- ... -* 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. +New Issues Found +================ -* 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. +- ... -* 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. +Python Binding Changes +---------------------- +The following methods have been added: -Last release which will run on Windows XP and Windows Vista ------------------------------------------------------------ +- ... -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. +Significant Known Problems +========================== Additional Information ====================== |