r268663 - Some release note updates for C++ language acceptance changes since Clang 3.8.

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Thu May 5 11:40:38 PDT 2016


Author: rsmith
Date: Thu May  5 13:40:37 2016
New Revision: 268663

URL: http://llvm.org/viewvc/llvm-project?rev=268663&view=rev
Log:
Some release note updates for C++ language acceptance changes since Clang 3.8.

Modified:
    cfe/trunk/docs/ReleaseNotes.rst

Modified: cfe/trunk/docs/ReleaseNotes.rst
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/ReleaseNotes.rst?rev=268663&r1=268662&r2=268663&view=diff
==============================================================================
--- cfe/trunk/docs/ReleaseNotes.rst (original)
+++ cfe/trunk/docs/ReleaseNotes.rst Thu May  5 13:40:37 2016
@@ -91,11 +91,61 @@ C11 Feature Support
 C++ Language Changes in Clang
 -----------------------------
 
-- ...
+- Clang now enforces the rule that a *using-declaration* cannot name an enumerator of a
+  scoped enumeration.
 
-C++11 Feature Support
+  .. codeblock:: c++
+
+    namespace Foo { enum class E { e }; }
+    namespace Bar {
+      using Foo::E::e; // error
+      constexpr auto e = Foo::E::e; // ok
+    }
+
+- Clang now enforces the rule that an enumerator of an unscoped enumeration declared at
+  class scope can only be named by a *using-declaration* in a derived class.
+
+  .. codeblock:: c++
+
+    class Foo { enum E { e }; }
+    using Foo::e; // error
+    static constexpr auto e = Foo::e; // ok
+
+...
+
+C++1z Feature Support
 ^^^^^^^^^^^^^^^^^^^^^
 
+Clang's experimental support for the upcoming C++1z standard can be enabled with ``-std=c++1z``.
+Changes to C++1z features since Clang 3.8:
+
+- The ``[[fallthrough]]``, ``[[nodiscard]]``, and ``[[maybe_unused]]`` attributes are
+  supported in C++11 onwards, and are largely synonymous with Clang's existing attributes
+  ``[[clang::fallthrough]]``, ``[[gnu::warn_unused_result]]``, and ``[[gnu::unused]]``.
+  Use ``-Wimplicit-fallthrough`` to warn on unannotated fallthrough within ``switch``
+  statements.
+
+- In C++1z mode, aggregate initialization can be performed for classes with base classes:
+
+  .. codeblock:: c++
+
+  struct A { int n; };
+  struct B : A { int x, y; };
+  B b = { 1, 2, 3 }; // b.n == 1, b.x == 2, b.y == 3
+
+- The range in a range-based ``for`` statement can have different types for its ``begin``
+  and ``end`` iterators. This is permitted as an extension in C++11 onwards.
+
+- Lambda-expressions can explicitly capture ``*this`` (to capture the surrounding object
+  by copy). This is permitted as an extension in C++11 onwards.
+
+- Objects of enumeration type can be direct-list-initialized from a value of the underlying
+  type. ``E{n}`` is equivalent to ``E(n)``, except that it implies a check for a narrowing
+  conversion.
+
+- Unary *fold-expression*\s over an empty pack are now rejected for all operators
+  other than ``&&``, ``||``, and ``,``.
+
 ...
 
 Objective-C Language Changes in Clang




More information about the cfe-commits mailing list