1=====================================
2Clang 3.9 (In-Progress) Release Notes
3=====================================
4
5.. contents::
6   :local:
7   :depth: 2
8
9Written by the `LLVM Team <http://llvm.org/>`_
10
11.. warning::
12
13   These are in-progress notes for the upcoming Clang 3.9 release. You may
14   prefer the `Clang 3.8 Release Notes
15   <http://llvm.org/releases/3.8.0/tools/clang/docs/ReleaseNotes.html>`_.
16
17Introduction
18============
19
20This document contains the release notes for the Clang C/C++/Objective-C
21frontend, part of the LLVM Compiler Infrastructure, release 3.9. Here we
22describe the status of Clang in some detail, including major
23improvements from the previous release and new feature work. For the
24general LLVM release notes, see `the LLVM
25documentation <http://llvm.org/docs/ReleaseNotes.html>`_. All LLVM
26releases may be downloaded from the `LLVM releases web
27site <http://llvm.org/releases/>`_.
28
29For more information about Clang or LLVM, including information about
30the latest release, please check out the main please see the `Clang Web
31Site <http://clang.llvm.org>`_ or the `LLVM Web
32Site <http://llvm.org>`_.
33
34Note that if you are reading this file from a Subversion checkout or the
35main Clang web page, this document applies to the *next* release, not
36the current one. To see the release notes for a specific release, please
37see the `releases page <http://llvm.org/releases/>`_.
38
39What's New in Clang 3.9?
40========================
41
42Some of the major new features and improvements to Clang are listed
43here. Generic improvements to Clang as a whole or to its underlying
44infrastructure are described first, followed by language-specific
45sections with improvements to Clang's support for those languages.
46
47Major New Features
48------------------
49
50- Clang will no longer passes --build-id by default to the linker. In modern
51  linkers that is a relatively expensive option. It can be passed explicitly
52  with -Wl,--build-id. To have clang always pass it, build clang with
53  -DENABLE_LINKER_BUILD_ID.
54
55Improvements to Clang's diagnostics
56^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
57
58Clang's diagnostics are constantly being improved to catch more issues,
59explain them more clearly, and provide more accurate source information
60about them. The improvements since the 3.7 release include:
61
62-  ...
63
64New Compiler Flags
65------------------
66
67The option ....
68
69
70New Pragmas in Clang
71-----------------------
72
73Clang now supports the ...
74
75Windows Support
76---------------
77
78Clang's support for building native Windows programs ...
79
80TLS is enabled for Cygwin defaults to -femulated-tls.
81
82
83C Language Changes in Clang
84---------------------------
85The -faltivec and -maltivec flags no longer silently include altivec.h on Power platforms.
86
87`RenderScript
88<https://developer.android.com/guide/topics/renderscript/compute.html>`_
89support added to the Frontend and enabled by the '-x renderscript' option or
90the '.rs' file extension.
91
92...
93
94C11 Feature Support
95^^^^^^^^^^^^^^^^^^^
96
97...
98
99C++ Language Changes in Clang
100-----------------------------
101
102- Clang now enforces the rule that a *using-declaration* cannot name an enumerator of a
103  scoped enumeration.
104
105  .. code-block:: c++
106
107    namespace Foo { enum class E { e }; }
108    namespace Bar {
109      using Foo::E::e; // error
110      constexpr auto e = Foo::E::e; // ok
111    }
112
113- Clang now enforces the rule that an enumerator of an unscoped enumeration declared at
114  class scope can only be named by a *using-declaration* in a derived class.
115
116  .. code-block:: c++
117
118    class Foo { enum E { e }; }
119    using Foo::e; // error
120    static constexpr auto e = Foo::e; // ok
121
122...
123
124C++1z Feature Support
125^^^^^^^^^^^^^^^^^^^^^
126
127Clang's experimental support for the upcoming C++1z standard can be enabled with ``-std=c++1z``.
128Changes to C++1z features since Clang 3.8:
129
130- The ``[[fallthrough]]``, ``[[nodiscard]]``, and ``[[maybe_unused]]`` attributes are
131  supported in C++11 onwards, and are largely synonymous with Clang's existing attributes
132  ``[[clang::fallthrough]]``, ``[[gnu::warn_unused_result]]``, and ``[[gnu::unused]]``.
133  Use ``-Wimplicit-fallthrough`` to warn on unannotated fallthrough within ``switch``
134  statements.
135
136- In C++1z mode, aggregate initialization can be performed for classes with base classes:
137
138  .. code-block:: c++
139
140    struct A { int n; };
141    struct B : A { int x, y; };
142    B b = { 1, 2, 3 }; // b.n == 1, b.x == 2, b.y == 3
143
144- The range in a range-based ``for`` statement can have different types for its ``begin``
145  and ``end`` iterators. This is permitted as an extension in C++11 onwards.
146
147- Lambda-expressions can explicitly capture ``*this`` (to capture the surrounding object
148  by copy). This is permitted as an extension in C++11 onwards.
149
150- Objects of enumeration type can be direct-list-initialized from a value of the underlying
151  type. ``E{n}`` is equivalent to ``E(n)``, except that it implies a check for a narrowing
152  conversion.
153
154- Unary *fold-expression*\s over an empty pack are now rejected for all operators
155  other than ``&&``, ``||``, and ``,``.
156
157...
158
159Objective-C Language Changes in Clang
160-------------------------------------
161
162...
163
164OpenCL C Language Changes in Clang
165----------------------------------
166
167...
168
169OpenMP Support in Clang
170----------------------------------
171
172Added support for all non-offloading features from OpenMP 4.5, including using
173data members in private clauses of non-static member functions. Additionally,
174data members can be used as loop control variables in loop-based directives.
175
176Currently Clang supports OpenMP 3.1 and all non-offloading features of
177OpenMP 4.0/4.5. Offloading features are under development. Clang defines macro
178_OPENMP and sets it to OpenMP 3.1 (in accordance with OpenMP standard) by
179default. User may change this value using ``-fopenmp-version=[31|40|45]`` option.
180
181The codegen for OpenMP constructs was significantly improved to produce much
182more stable and faster code.
183
184Internal API Changes
185--------------------
186
187These are major API changes that have happened since the 3.8 release of
188Clang. If upgrading an external codebase that uses Clang as a library,
189this section should help get you past the largest hurdles of upgrading.
190
191-  ...
192
193AST Matchers
194------------
195
196- has and hasAnyArgument: Matchers no longer ignores parentheses and implicit
197  casts on the argument before applying the inner matcher. The fix was done to
198  allow for greater control by the user. In all existing checkers that use this
199  matcher all instances of code ``hasAnyArgument(<inner matcher>)`` or
200  ``has(<inner matcher>)`` must be changed to
201  ``hasAnyArgument(ignoringParenImpCasts(<inner matcher>))`` or
202  ``has(ignoringParenImpCasts(<inner matcher>))``.
203
204...
205
206libclang
207--------
208
209...
210
211Static Analyzer
212---------------
213
214...
215
216Core Analysis Improvements
217==========================
218
219- ...
220
221New Issues Found
222================
223
224- ...
225
226Python Binding Changes
227----------------------
228
229The following methods have been added:
230
231-  ...
232
233Significant Known Problems
234==========================
235
236Additional Information
237======================
238
239A wide variety of additional information is available on the `Clang web
240page <http://clang.llvm.org/>`_. The web page contains versions of the
241API documentation which are up-to-date with the Subversion version of
242the source code. You can access versions of these documents specific to
243this release by going into the "``clang/docs/``" directory in the Clang
244tree.
245
246If you have any questions or comments about Clang, please feel free to
247contact us via the `mailing
248list <http://lists.llvm.org/mailman/listinfo/cfe-dev>`_.
249