summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-08-24 16:35:14 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-08-24 16:35:14 +0000
commita75fa8aaf2005c6cb7561a9aa5129a38075939a4 (patch)
tree94be7b66ac4af783a71d740df76ce40f31e02145 /docs
parent6aa46a19c56750e17f7acedc47d95111fd2dcd5d (diff)
downloadsrc-test2-a75fa8aaf2005c6cb7561a9aa5129a38075939a4.tar.gz
src-test2-a75fa8aaf2005c6cb7561a9aa5129a38075939a4.zip
Notes
Diffstat (limited to 'docs')
-rw-r--r--docs/ReleaseNotes.rst148
1 files changed, 143 insertions, 5 deletions
diff --git a/docs/ReleaseNotes.rst b/docs/ReleaseNotes.rst
index 982abb024525..5f9991439697 100644
--- a/docs/ReleaseNotes.rst
+++ b/docs/ReleaseNotes.rst
@@ -49,6 +49,15 @@ Major New Features
- ...
+C++ coroutines
+^^^^^^^^^^^^^^
+`C++ coroutines TS
+<http://open-std.org/jtc1/sc22/wg21/docs/papers/2017/n4680.pdf>`_
+implementation has landed. Use ``-fcoroutines-ts -stdlib=libc++`` to enable
+coroutine support. Here is `an example
+<https://wandbox.org/permlink/Dth1IO5q8Oe31ew2>`_ to get you started.
+
+
Improvements to Clang's diagnostics
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -58,6 +67,25 @@ 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.
+- -Wstrict-prototypes is a new warning that warns about non-prototype
+ function and block declarations and types in C and Objective-C.
+
+- -Wunguarded-availability is a new warning that warns about uses of new
+ APIs that were introduced in a system whose version is newer than the
+ deployment target version. A new Objective-C expression ``@available`` has
+ been introduced to perform system version checking at runtime. This warning
+ is off by default to prevent unexpected warnings in existing projects.
+ However, its less strict sibling -Wunguarded-availability-new is on by
+ default. It warns about unguarded uses of APIs only when they were introduced
+ in or after macOS 10.13, iOS 11, tvOS 11 or watchOS 4.
+
+- The -Wdocumentation warning now allows the use of ``\param`` and
+ ``\returns`` documentation directives in the documentation comments for
+ declarations with a function or a block pointer type.
+
+- The compiler no longer warns about unreachable ``__builtin_unreachable``
+ statements.
+
New Compiler Flags
------------------
@@ -76,8 +104,12 @@ future versions of Clang.
New Pragmas in Clang
-----------------------
-Clang now supports the ...
+- Clang now supports the ``clang attribute`` pragma that allows users to apply
+ an attribute to multiple declarations.
+- ``pragma pack`` directives that are included in a precompiled header are now
+ applied correctly to the declarations in the compilation unit that includes
+ that precompiled header.
Attribute Changes in Clang
--------------------------
@@ -85,6 +117,8 @@ Attribute Changes in Clang
- The ``overloadable`` attribute now allows at most one function with a given
name to lack the ``overloadable`` attribute. This unmarked function will not
have its name mangled.
+- The ```ms_abi`` attribute and the ``__builtin_ms_va_list`` types and builtins
+ are now supported on AArch64.
Windows Support
---------------
@@ -95,7 +129,41 @@ Clang's support for building native Windows programs ...
C Language Changes in Clang
---------------------------
-- ...
+- Added near complete support for implicit scalar to vector conversion, a GNU
+ C/C++ language extension. With this extension, the following code is
+ considered valid:
+
+.. code-block:: c
+
+ typedef unsigned v4i32 __attribute__((vector_size(16)));
+
+ v4i32 foo(v4i32 a) {
+ // Here 5 is implicitly casted to an unsigned value and replicated into a
+ // vector with as many elements as 'a'.
+ return a + 5;
+ }
+
+The implicit conversion of a scalar value to a vector value--in the context of
+a vector expression--occurs when:
+
+- The type of the vector is that of a ``__attribute__((vector_size(size)))``
+ vector, not an OpenCL ``__attribute__((ext_vector_type(size)))`` vector type.
+
+- The scalar value can be casted to that of the vector element's type without
+ the loss of precision based on the type of the scalar and the type of the
+ vector's elements.
+
+- For compile time constant values, the above rule is weakened to consider the
+ value of the scalar constant rather than the constant's type.
+
+- Floating point constants with precise integral representations are not
+ implicitly converted to integer values, this is for compatability with GCC.
+
+
+Currently the basic integer and floating point types with the following
+operators are supported: ``+``, ``/``, ``-``, ``*``, ``%``, ``>``, ``<``,
+``>=``, ``<=``, ``==``, ``!=``, ``&``, ``|``, ``^`` and the corresponding
+assignment operators where applicable.
...
@@ -107,6 +175,10 @@ C11 Feature Support
C++ Language Changes in Clang
-----------------------------
+- As mentioned in `C Language Changes in Clang`_, Clang's support for
+ implicit scalar to vector conversions also applies to C++. Additionally
+ the following operators are also supported: ``&&`` and ``||``.
+
...
C++1z Feature Support
@@ -117,12 +189,56 @@ C++1z Feature Support
Objective-C Language Changes in Clang
-------------------------------------
-...
+- Clang now guarantees that a ``readwrite`` property is synthesized when an
+ ambiguous property (i.e. a property that's declared in multiple protocols)
+ is synthesized. The ``-Wprotocol-property-synthesis-ambiguity`` warning that
+ warns about incompatible property types is now promoted to an error when
+ there's an ambiguity between ``readwrite`` and ``readonly`` properties.
+
+- Clang now prohibits synthesis of ambiguous properties with incompatible
+ explicit property attributes. The following property attributes are
+ checked for differences: ``copy``, ``retain``/``strong``, ``atomic``,
+ ``getter`` and ``setter``.
OpenCL C Language Changes in Clang
----------------------------------
-...
+Various bug fixes and improvements:
+
+- Extended OpenCL-related Clang tests.
+
+- Improved diagnostics across several areas: scoped address space
+ qualified variables, function pointers, atomics, type rank for overloading,
+ block captures, ``reserve_id_t``.
+
+- Several address space related fixes for constant address space function scope variables,
+ IR generation, mangling of ``generic`` and alloca (post-fix from general Clang
+ refactoring of address spaces).
+
+- Several improvements in extensions: fixed OpenCL version for ``cl_khr_mipmap_image``,
+ added missing ``cl_khr_3d_image_writes``.
+
+- Improvements in ``enqueue_kernel``, especially the implementation of ``ndrange_t`` and blocks.
+
+- OpenCL type related fixes: global samplers, the ``pipe_t`` size, internal type redefinition,
+ and type compatibility checking in ternary and other operations.
+
+- The OpenCL header has been extended with missing extension guards, and direct mapping of ``as_type``
+ to ``__builtin_astype``.
+
+- Fixed ``kernel_arg_type_qual`` and OpenCL/SPIR version in metadata.
+
+- Added proper use of the kernel calling convention to various targets.
+
+The following new functionalities have been added:
+
+- Added documentation on OpenCL to Clang user manual.
+
+- Extended Clang builtins with required ``cl_khr_subgroups`` support.
+
+- Add ``intel_reqd_sub_group_size`` attribute support.
+
+- Added OpenCL types to ``CIndex``.
OpenMP Support in Clang
----------------------------------
@@ -194,8 +310,30 @@ clang-format
libclang
--------
-...
+- Libclang now provides code-completion results for more C++ constructs
+ and keywords. The following keywords/identifiers are now included in the
+ code-completion results: ``static_assert``, ``alignas``, ``constexpr``,
+ ``final``, ``noexcept``, ``override`` and ``thread_local``.
+
+- Libclang now provides code-completion results for members from dependent
+ classes. For example:
+
+ .. code-block:: c++
+
+ template<typename T>
+ void appendValue(std::vector<T> &dest, const T &value) {
+ dest. // Relevant completion results are now shown after '.'
+ }
+
+ Note that code-completion results are still not provided when the member
+ expression includes a dependent base expression. For example:
+
+ .. code-block:: c++
+ template<typename T>
+ void appendValue(std::vector<std::vector<T>> &dest, const T &value) {
+ dest.at(0). // Libclang fails to provide completion results after '.'
+ }
Static Analyzer
---------------