blob: 7ac6b69b4917b61bb0d48c89499de9d4dca80f1b [file] [log] [blame]
Benjamin Kramer665a8dc2012-01-15 15:26:07 +00001<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2 "http://www.w3.org/TR/html4/strict.dtd">
Chandler Carruthc00c0c32011-11-28 07:16:19 +00003<html>
4<head>
Richard Smith45fb9952012-02-16 00:32:27 +00005<title>Clang 3.1 Release Notes</title>
Benjamin Kramer665a8dc2012-01-15 15:26:07 +00006<link type="text/css" rel="stylesheet" href="../menu.css">
7<link type="text/css" rel="stylesheet" href="../content.css">
Chandler Carruthc00c0c32011-11-28 07:16:19 +00008<style type="text/css">
9td {
10 vertical-align: top;
11}
12</style>
13</head>
14<body>
15
16<!--#include virtual="../menu.html.incl"-->
17
18<div id="content">
19
Richard Smith45fb9952012-02-16 00:32:27 +000020<h1>Clang 3.1 Release Notes</h1>
Chandler Carruthc00c0c32011-11-28 07:16:19 +000021
Benjamin Kramer665a8dc2012-01-15 15:26:07 +000022<img style="float:right" src="http://llvm.org/img/DragonSmall.png"
Chandler Carruthc00c0c32011-11-28 07:16:19 +000023 width="136" height="136" alt="LLVM Dragon Logo">
24
25<ul>
26 <li><a href="#intro">Introduction</a></li>
Richard Smith45fb9952012-02-16 00:32:27 +000027 <li><a href="#whatsnew">What's New in Clang 3.1?</a>
Chandler Carruthc00c0c32011-11-28 07:16:19 +000028 <ul>
29 <li><a href="#majorfeatures">Major New Features</a></li>
30 <li><a href="#cchanges">C Language Changes</a></li>
Richard Smith45fb9952012-02-16 00:32:27 +000031 <li><a href="#cxxchanges">C++ Language Changes</a></li>
Jean-Daniel Dupas3fd80872012-03-03 13:37:22 +000032 <li><a href="#objcchanges">Objective-C Language Changes</a></li>
Chandler Carruthc00c0c32011-11-28 07:16:19 +000033 <li><a href="#apichanges">Internal API Changes</a></li>
Richard Smith855746b2011-11-28 20:02:05 +000034 </ul>
Chandler Carruthc00c0c32011-11-28 07:16:19 +000035 </li>
36 <li><a href="#knownproblems">Known Problems</a></li>
37 <li><a href="#additionalinfo">Additional Information</a></li>
38</ul>
39
40<div class="doc_author">
41 <p>Written by the <a href="http://llvm.org/">LLVM Team</a></p>
42</div>
43
Richard Smith45fb9952012-02-16 00:32:27 +000044<h1 style="color:red">These are in-progress notes for the upcoming Clang 3.1
Chandler Carruthc00c0c32011-11-28 07:16:19 +000045release.<br>
46You may prefer the
Richard Smith45fb9952012-02-16 00:32:27 +000047<a href="http://llvm.org/releases/3.0/docs/ClangReleaseNotes.html">Clang 3.0
Chandler Carruthc00c0c32011-11-28 07:16:19 +000048Release Notes</a>.</h1>
Chandler Carruthc00c0c32011-11-28 07:16:19 +000049
50<!-- ======================================================================= -->
51<h2 id="intro">Introduction</h2>
52<!-- ======================================================================= -->
53
54<p>This document contains the release notes for the Clang C/C++/Objective-C
Richard Smith45fb9952012-02-16 00:32:27 +000055frontend, part of the LLVM Compiler Infrastructure, release 3.1. Here we
Chandler Carruthc00c0c32011-11-28 07:16:19 +000056describe the status of Clang in some detail, including major improvements from
57the previous release and new feature work. For the general LLVM release notes,
Peter Collingbourne5cc989e2011-11-29 02:03:03 +000058see <a href="http://llvm.org/docs/ReleaseNotes.html">the LLVM
Chandler Carruthc00c0c32011-11-28 07:16:19 +000059 documentation</a>. All LLVM releases may be downloaded from the
60<a href="http://llvm.org/releases/">LLVM releases web site</a>.</p>
61
62<p>For more information about Clang or LLVM, including information about the
63latest release, please check out the main please see the
64<a href="http://clang.llvm.org">Clang Web Site</a> or the
65<a href="http://llvm.org">LLVM Web Site</a>.
66
67<p>Note that if you are reading this file from a Subversion checkout or the main
68Clang web page, this document applies to the <i>next</i> release, not the
69current one. To see the release notes for a specific release, please see the
70<a href="http://llvm.org/releases/">releases page</a>.</p>
71
72<!-- ======================================================================= -->
Richard Smith45fb9952012-02-16 00:32:27 +000073<h2 id="whatsnew">What's New in Clang 3.1?</h2>
Chandler Carruthc00c0c32011-11-28 07:16:19 +000074<!-- ======================================================================= -->
75
76<p>Some of the major new features and improvements to Clang are listed here.
77Generic improvements to Clang as a whole or two its underlying infrastructure
78are described first, followed by language-specific sections with improvements to
79Clang's support for those languages.</p>
80
81<!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
82<h3 id="majorfeatures">Major New Features</h3>
83<!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
84
Richard Smith45fb9952012-02-16 00:32:27 +000085<h4 id="majorfeature1">Feature 1</h4>
86...
Chandler Carrutha0df07d2011-11-28 22:17:58 +000087
Nico Weber04606512012-02-16 02:35:03 +000088<h4 id="diagnostics">New and better diagnostics</h4>
89
Dmitri Gribenko65005eb2012-02-18 14:13:26 +000090<p>New: <code>-Wdangling-else</code>, <code>-Wstrncat-size</code>, ...</p>
Nico Weber04606512012-02-16 02:35:03 +000091
David Blaikief76e7f72012-04-05 00:47:38 +000092<p>Improved: <code>-Wformat</code>, <code>-Wempty-body</code>,
93<code>-Wliteral-conversion</code>, ...</p>
Nico Weber04606512012-02-16 02:35:03 +000094
Manuel Klimek92f74092012-04-04 12:53:16 +000095<h4 id="tooling">Tooling</h4>
96<!-- FIXME: add a link to the tooling documentation once that's written. -->
97<p>Added an API to enable clang-based standalone tools, including initial build
98system integration.</p>
99
Chandler Carruthc00c0c32011-11-28 07:16:19 +0000100<!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
101<h3 id="cchanges">C Language Changes in Clang</h3>
102<!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
103
Richard Smith45fb9952012-02-16 00:32:27 +0000104<h4 id="c11changes">C11 Feature Support</h4>
Richard Smith62d730f2011-11-28 22:48:25 +0000105
Richard Smith45fb9952012-02-16 00:32:27 +0000106<p>Clang 3.1 adds support for anonymous structs and anonymous unions, added in
107the latest ISO C standard. Use <code>-std=c11</code> or <code>-std=gnu11</code>
108to enable support for the new language standard. The new C11 features are
Richard Smith62d730f2011-11-28 22:48:25 +0000109backwards-compatible and are available as an extension in all language
110modes.</p>
111
Richard Smith45fb9952012-02-16 00:32:27 +0000112<p>All warning and language selection flags which previously accepted
113<code>c1x</code> have been updated to accept <code>c11</code>. The old
114<code>c1x</code> forms have been removed.
115
Chandler Carruthc00c0c32011-11-28 07:16:19 +0000116<!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
117<h3 id="cxxchanges">C++ Language Changes in Clang</h3>
118<!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
119
Richard Smith855746b2011-11-28 20:02:05 +0000120<h4 id="cxx11changes">C++11 Feature Support</h4>
Richard Smith45fb9952012-02-16 00:32:27 +0000121<p>Clang 3.1 adds support for
Richard Smith855746b2011-11-28 20:02:05 +0000122<a href="http://clang.llvm.org/cxx_status.html#cxx11">more of the language
Richard Smith47931382011-11-28 23:35:03 +0000123features</a> added in the latest ISO C++ standard,
124<a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=50372">C++ 2011</a>.
125Use <code>-std=c++11</code> or <code>-std=gnu++11</code> to enable support for
Richard Smith45fb9952012-02-16 00:32:27 +0000126these features. In addition to the features supported by Clang 3.0, the
127following are now considered to be of production quality:
Richard Smith855746b2011-11-28 20:02:05 +0000128<ul>
Richard Smith45fb9952012-02-16 00:32:27 +0000129 <li>Generalized constant expressions</li>
Douglas Gregorf28ded52012-02-23 17:54:00 +0000130 <li>Lambda expressions</li>
Richard Smith45fb9952012-02-16 00:32:27 +0000131 <li>Generalized initializers</li>
Richard Smithec92bc72012-03-03 23:51:05 +0000132 <li>Unrestricted unions</li>
Richard Smith69e76922012-03-09 19:09:47 +0000133 <li>User-defined literals</li>
Richard Smith1f4c54d2012-03-26 20:31:41 +0000134 <li>Forward-declared enumerations</li>
Richard Smith855746b2011-11-28 20:02:05 +0000135</ul>
136
Chandler Carruthc00c0c32011-11-28 07:16:19 +0000137<!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
138<h3 id="objcchanges">Objective-C Language Changes in Clang</h3>
139<!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
Richard Smith45fb9952012-02-16 00:32:27 +0000140Clang 3.1 introduces several new Objective-C language features and improvements.
Chandler Carruth4d582122011-11-29 00:15:23 +0000141
Nico Weber04606512012-02-16 02:35:03 +0000142<h4 id="objcwformat">Format string checking for NSString literals</h4>
143
144<code>-Wformat</code> now checks <code>@"nsstring literals"</code>.
Chandler Carruth52e375e2011-11-29 00:15:25 +0000145
Chandler Carruthc00c0c32011-11-28 07:16:19 +0000146<!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
147<h3 id="apichanges">Internal API Changes</h3>
148<!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
149
Richard Smith45fb9952012-02-16 00:32:27 +0000150These are major API changes that have happened since the 3.0 release of Clang.
Chandler Carruthc4dbffa2011-11-28 18:55:47 +0000151If upgrading an external codebase that uses Clang as a library, this section
152should help get you past the largest hurdles of upgrading.
153
Richard Smith45fb9952012-02-16 00:32:27 +0000154<h4 id="api1">API change 1</h4>
155...
Chandler Carruthc4dbffa2011-11-28 18:55:47 +0000156
Chandler Carruthc00c0c32011-11-28 07:16:19 +0000157<!-- ======================================================================= -->
158<h2 id="knownproblems">Significant Known Problems</h2>
159<!-- ======================================================================= -->
160
161<!-- ======================================================================= -->
162<h2 id="additionalinfo">Additional Information</h2>
163<!-- ======================================================================= -->
164
165<p>A wide variety of additional information is available on the
166<a href="http://clang.llvm.org/">Clang web page</a>. The web page contains
167versions of the API documentation which are up-to-date with the Subversion
168version of the source code. You can access versions of these documents specific
169to this release by going into the "<tt>clang/doc/</tt>" directory in the Clang
170tree.</p>
171
172<p>If you have any questions or comments about Clang, please feel free to
173contact us via the <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">
174mailing list</a>.</p>
175
Chandler Carruth59abf062011-11-28 22:12:44 +0000176
177<!-- ======================================================================= -->
178<!-- Likely 3.1 release notes -->
179<!-- ======================================================================= -->
180<!--
181This is just a section to hold things that have already gotten started and
182should likely pick up proper release notes in 3.1.
183
184- C1X and C++11 atomics infrastructure and support
185- CUDA support?
186
187-->
188
Benjamin Kramer665a8dc2012-01-15 15:26:07 +0000189</div>
Chandler Carruthc00c0c32011-11-28 07:16:19 +0000190</body>
191</html>