Benjamin Kramer | 665a8dc | 2012-01-15 15:26:07 +0000 | [diff] [blame] | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" |
| 2 | "http://www.w3.org/TR/html4/strict.dtd"> |
Chandler Carruth | c00c0c3 | 2011-11-28 07:16:19 +0000 | [diff] [blame] | 3 | <html> |
| 4 | <head> |
Richard Smith | 45fb995 | 2012-02-16 00:32:27 +0000 | [diff] [blame] | 5 | <title>Clang 3.1 Release Notes</title> |
Benjamin Kramer | 665a8dc | 2012-01-15 15:26:07 +0000 | [diff] [blame] | 6 | <link type="text/css" rel="stylesheet" href="../menu.css"> |
| 7 | <link type="text/css" rel="stylesheet" href="../content.css"> |
Chandler Carruth | c00c0c3 | 2011-11-28 07:16:19 +0000 | [diff] [blame] | 8 | <style type="text/css"> |
| 9 | td { |
| 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 Smith | 45fb995 | 2012-02-16 00:32:27 +0000 | [diff] [blame] | 20 | <h1>Clang 3.1 Release Notes</h1> |
Chandler Carruth | c00c0c3 | 2011-11-28 07:16:19 +0000 | [diff] [blame] | 21 | |
Benjamin Kramer | 665a8dc | 2012-01-15 15:26:07 +0000 | [diff] [blame] | 22 | <img style="float:right" src="http://llvm.org/img/DragonSmall.png" |
Chandler Carruth | c00c0c3 | 2011-11-28 07:16:19 +0000 | [diff] [blame] | 23 | width="136" height="136" alt="LLVM Dragon Logo"> |
| 24 | |
| 25 | <ul> |
| 26 | <li><a href="#intro">Introduction</a></li> |
Richard Smith | 45fb995 | 2012-02-16 00:32:27 +0000 | [diff] [blame] | 27 | <li><a href="#whatsnew">What's New in Clang 3.1?</a> |
Chandler Carruth | c00c0c3 | 2011-11-28 07:16:19 +0000 | [diff] [blame] | 28 | <ul> |
| 29 | <li><a href="#majorfeatures">Major New Features</a></li> |
| 30 | <li><a href="#cchanges">C Language Changes</a></li> |
Richard Smith | 45fb995 | 2012-02-16 00:32:27 +0000 | [diff] [blame] | 31 | <li><a href="#cxxchanges">C++ Language Changes</a></li> |
Jean-Daniel Dupas | 3fd8087 | 2012-03-03 13:37:22 +0000 | [diff] [blame] | 32 | <li><a href="#objcchanges">Objective-C Language Changes</a></li> |
Chandler Carruth | c00c0c3 | 2011-11-28 07:16:19 +0000 | [diff] [blame] | 33 | <li><a href="#apichanges">Internal API Changes</a></li> |
Gregory Szorc | 6341900 | 2012-05-12 20:45:56 +0000 | [diff] [blame^] | 34 | <li><a href="#pythonchanges">Python Binding Changes</a></li> |
Richard Smith | 855746b | 2011-11-28 20:02:05 +0000 | [diff] [blame] | 35 | </ul> |
Chandler Carruth | c00c0c3 | 2011-11-28 07:16:19 +0000 | [diff] [blame] | 36 | </li> |
| 37 | <li><a href="#knownproblems">Known Problems</a></li> |
| 38 | <li><a href="#additionalinfo">Additional Information</a></li> |
| 39 | </ul> |
| 40 | |
| 41 | <div class="doc_author"> |
| 42 | <p>Written by the <a href="http://llvm.org/">LLVM Team</a></p> |
| 43 | </div> |
| 44 | |
Richard Smith | 45fb995 | 2012-02-16 00:32:27 +0000 | [diff] [blame] | 45 | <h1 style="color:red">These are in-progress notes for the upcoming Clang 3.1 |
Chandler Carruth | c00c0c3 | 2011-11-28 07:16:19 +0000 | [diff] [blame] | 46 | release.<br> |
| 47 | You may prefer the |
Richard Smith | 45fb995 | 2012-02-16 00:32:27 +0000 | [diff] [blame] | 48 | <a href="http://llvm.org/releases/3.0/docs/ClangReleaseNotes.html">Clang 3.0 |
Chandler Carruth | c00c0c3 | 2011-11-28 07:16:19 +0000 | [diff] [blame] | 49 | Release Notes</a>.</h1> |
Chandler Carruth | c00c0c3 | 2011-11-28 07:16:19 +0000 | [diff] [blame] | 50 | |
| 51 | <!-- ======================================================================= --> |
| 52 | <h2 id="intro">Introduction</h2> |
| 53 | <!-- ======================================================================= --> |
| 54 | |
| 55 | <p>This document contains the release notes for the Clang C/C++/Objective-C |
Richard Smith | 45fb995 | 2012-02-16 00:32:27 +0000 | [diff] [blame] | 56 | frontend, part of the LLVM Compiler Infrastructure, release 3.1. Here we |
Chandler Carruth | c00c0c3 | 2011-11-28 07:16:19 +0000 | [diff] [blame] | 57 | describe the status of Clang in some detail, including major improvements from |
| 58 | the previous release and new feature work. For the general LLVM release notes, |
Peter Collingbourne | 5cc989e | 2011-11-29 02:03:03 +0000 | [diff] [blame] | 59 | see <a href="http://llvm.org/docs/ReleaseNotes.html">the LLVM |
Chandler Carruth | c00c0c3 | 2011-11-28 07:16:19 +0000 | [diff] [blame] | 60 | documentation</a>. All LLVM releases may be downloaded from the |
| 61 | <a href="http://llvm.org/releases/">LLVM releases web site</a>.</p> |
| 62 | |
| 63 | <p>For more information about Clang or LLVM, including information about the |
| 64 | latest release, please check out the main please see the |
| 65 | <a href="http://clang.llvm.org">Clang Web Site</a> or the |
| 66 | <a href="http://llvm.org">LLVM Web Site</a>. |
| 67 | |
| 68 | <p>Note that if you are reading this file from a Subversion checkout or the main |
| 69 | Clang web page, this document applies to the <i>next</i> release, not the |
| 70 | current one. To see the release notes for a specific release, please see the |
| 71 | <a href="http://llvm.org/releases/">releases page</a>.</p> |
| 72 | |
| 73 | <!-- ======================================================================= --> |
Richard Smith | 45fb995 | 2012-02-16 00:32:27 +0000 | [diff] [blame] | 74 | <h2 id="whatsnew">What's New in Clang 3.1?</h2> |
Chandler Carruth | c00c0c3 | 2011-11-28 07:16:19 +0000 | [diff] [blame] | 75 | <!-- ======================================================================= --> |
| 76 | |
| 77 | <p>Some of the major new features and improvements to Clang are listed here. |
| 78 | Generic improvements to Clang as a whole or two its underlying infrastructure |
| 79 | are described first, followed by language-specific sections with improvements to |
| 80 | Clang's support for those languages.</p> |
| 81 | |
| 82 | <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = --> |
| 83 | <h3 id="majorfeatures">Major New Features</h3> |
| 84 | <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = --> |
| 85 | |
Richard Smith | 45fb995 | 2012-02-16 00:32:27 +0000 | [diff] [blame] | 86 | <h4 id="majorfeature1">Feature 1</h4> |
| 87 | ... |
Chandler Carruth | a0df07d | 2011-11-28 22:17:58 +0000 | [diff] [blame] | 88 | |
Nico Weber | 0460651 | 2012-02-16 02:35:03 +0000 | [diff] [blame] | 89 | <h4 id="diagnostics">New and better diagnostics</h4> |
| 90 | |
Dmitri Gribenko | 65005eb | 2012-02-18 14:13:26 +0000 | [diff] [blame] | 91 | <p>New: <code>-Wdangling-else</code>, <code>-Wstrncat-size</code>, ...</p> |
Nico Weber | 0460651 | 2012-02-16 02:35:03 +0000 | [diff] [blame] | 92 | |
David Blaikie | f76e7f7 | 2012-04-05 00:47:38 +0000 | [diff] [blame] | 93 | <p>Improved: <code>-Wformat</code>, <code>-Wempty-body</code>, |
| 94 | <code>-Wliteral-conversion</code>, ...</p> |
Nico Weber | 0460651 | 2012-02-16 02:35:03 +0000 | [diff] [blame] | 95 | |
Manuel Klimek | 92f7409 | 2012-04-04 12:53:16 +0000 | [diff] [blame] | 96 | <h4 id="tooling">Tooling</h4> |
| 97 | <!-- FIXME: add a link to the tooling documentation once that's written. --> |
| 98 | <p>Added an API to enable clang-based standalone tools, including initial build |
| 99 | system integration.</p> |
| 100 | |
Chandler Carruth | c00c0c3 | 2011-11-28 07:16:19 +0000 | [diff] [blame] | 101 | <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = --> |
| 102 | <h3 id="cchanges">C Language Changes in Clang</h3> |
| 103 | <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = --> |
| 104 | |
Richard Smith | 45fb995 | 2012-02-16 00:32:27 +0000 | [diff] [blame] | 105 | <h4 id="c11changes">C11 Feature Support</h4> |
Richard Smith | 62d730f | 2011-11-28 22:48:25 +0000 | [diff] [blame] | 106 | |
Richard Smith | 45fb995 | 2012-02-16 00:32:27 +0000 | [diff] [blame] | 107 | <p>Clang 3.1 adds support for anonymous structs and anonymous unions, added in |
| 108 | the latest ISO C standard. Use <code>-std=c11</code> or <code>-std=gnu11</code> |
| 109 | to enable support for the new language standard. The new C11 features are |
Richard Smith | 62d730f | 2011-11-28 22:48:25 +0000 | [diff] [blame] | 110 | backwards-compatible and are available as an extension in all language |
| 111 | modes.</p> |
| 112 | |
Richard Smith | 45fb995 | 2012-02-16 00:32:27 +0000 | [diff] [blame] | 113 | <p>All warning and language selection flags which previously accepted |
| 114 | <code>c1x</code> have been updated to accept <code>c11</code>. The old |
| 115 | <code>c1x</code> forms have been removed. |
| 116 | |
Chandler Carruth | c00c0c3 | 2011-11-28 07:16:19 +0000 | [diff] [blame] | 117 | <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = --> |
| 118 | <h3 id="cxxchanges">C++ Language Changes in Clang</h3> |
| 119 | <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = --> |
| 120 | |
Richard Smith | 855746b | 2011-11-28 20:02:05 +0000 | [diff] [blame] | 121 | <h4 id="cxx11changes">C++11 Feature Support</h4> |
Richard Smith | 526cda3 | 2012-04-27 00:40:44 +0000 | [diff] [blame] | 122 | <p>Clang 3.1 supports |
| 123 | <a href="http://clang.llvm.org/cxx_status.html#cxx11">most of the language |
Richard Smith | 4793138 | 2011-11-28 23:35:03 +0000 | [diff] [blame] | 124 | features</a> added in the latest ISO C++ standard, |
| 125 | <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=50372">C++ 2011</a>. |
| 126 | Use <code>-std=c++11</code> or <code>-std=gnu++11</code> to enable support for |
Richard Smith | 45fb995 | 2012-02-16 00:32:27 +0000 | [diff] [blame] | 127 | these features. In addition to the features supported by Clang 3.0, the |
| 128 | following are now considered to be of production quality: |
Richard Smith | 855746b | 2011-11-28 20:02:05 +0000 | [diff] [blame] | 129 | <ul> |
Richard Smith | 45fb995 | 2012-02-16 00:32:27 +0000 | [diff] [blame] | 130 | <li>Generalized constant expressions</li> |
Douglas Gregor | f28ded5 | 2012-02-23 17:54:00 +0000 | [diff] [blame] | 131 | <li>Lambda expressions</li> |
Richard Smith | 45fb995 | 2012-02-16 00:32:27 +0000 | [diff] [blame] | 132 | <li>Generalized initializers</li> |
Richard Smith | ec92bc7 | 2012-03-03 23:51:05 +0000 | [diff] [blame] | 133 | <li>Unrestricted unions</li> |
Richard Smith | 69e7692 | 2012-03-09 19:09:47 +0000 | [diff] [blame] | 134 | <li>User-defined literals</li> |
Richard Smith | 1f4c54d | 2012-03-26 20:31:41 +0000 | [diff] [blame] | 135 | <li>Forward-declared enumerations</li> |
Richard Smith | 95e7aaf | 2012-04-13 01:24:35 +0000 | [diff] [blame] | 136 | <li>Atomics (both libc++'s and libstdc++4.7's <tt><atomic></tt> are |
| 137 | supported)</li> |
Richard Smith | 855746b | 2011-11-28 20:02:05 +0000 | [diff] [blame] | 138 | </ul> |
| 139 | |
Chandler Carruth | c00c0c3 | 2011-11-28 07:16:19 +0000 | [diff] [blame] | 140 | <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = --> |
| 141 | <h3 id="objcchanges">Objective-C Language Changes in Clang</h3> |
| 142 | <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = --> |
Richard Smith | 45fb995 | 2012-02-16 00:32:27 +0000 | [diff] [blame] | 143 | Clang 3.1 introduces several new Objective-C language features and improvements. |
Chandler Carruth | 4d58212 | 2011-11-29 00:15:23 +0000 | [diff] [blame] | 144 | |
Nico Weber | 0460651 | 2012-02-16 02:35:03 +0000 | [diff] [blame] | 145 | <h4 id="objcwformat">Format string checking for NSString literals</h4> |
| 146 | |
| 147 | <code>-Wformat</code> now checks <code>@"nsstring literals"</code>. |
Chandler Carruth | 52e375e | 2011-11-29 00:15:25 +0000 | [diff] [blame] | 148 | |
Chandler Carruth | c00c0c3 | 2011-11-28 07:16:19 +0000 | [diff] [blame] | 149 | <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = --> |
| 150 | <h3 id="apichanges">Internal API Changes</h3> |
| 151 | <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = --> |
| 152 | |
Richard Smith | 45fb995 | 2012-02-16 00:32:27 +0000 | [diff] [blame] | 153 | These are major API changes that have happened since the 3.0 release of Clang. |
Chandler Carruth | c4dbffa | 2011-11-28 18:55:47 +0000 | [diff] [blame] | 154 | If upgrading an external codebase that uses Clang as a library, this section |
| 155 | should help get you past the largest hurdles of upgrading. |
| 156 | |
Richard Smith | 45fb995 | 2012-02-16 00:32:27 +0000 | [diff] [blame] | 157 | <h4 id="api1">API change 1</h4> |
| 158 | ... |
Chandler Carruth | c4dbffa | 2011-11-28 18:55:47 +0000 | [diff] [blame] | 159 | |
Gregory Szorc | 6341900 | 2012-05-12 20:45:56 +0000 | [diff] [blame^] | 160 | <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = --> |
| 161 | <h3 id="pythonchanges">Python Binding Changes</h3> |
| 162 | <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = --> |
| 163 | |
| 164 | The following methods have been added: |
| 165 | <ul> |
| 166 | <li>SourceLocation.from_position (static)</li> |
| 167 | <li>SourceLocation.__eq__ and SourceLocation.__ne__</li> |
| 168 | <li>SourceRange.__eq__ and SourceRange.__ne__</li> |
| 169 | <li>Diagnostic.category_number (property)</li> |
| 170 | <li>Diagnostic.category_name (property)</li> |
| 171 | <li>Diagnostic.option (property)</li> |
| 172 | <li>Diagnostic.disable_option (property)</li> |
| 173 | <li>CursorKind.is_translation_unit</li> |
| 174 | <li>CursorKind.is_preprocessing</li> |
| 175 | <li>CursorKind.is_unexposed</li> |
| 176 | <li>Cursor.from_location (static)</li> |
| 177 | <li>Cursor.underlying_typedef_type (property)</li> |
| 178 | <li>Cursor.enum_type (property)</li> |
| 179 | <li>Cursor.objc_type_encoding (property)</li> |
| 180 | <li>Cursor.hash</li> |
| 181 | <li>TypeKind.spelling</li> |
| 182 | <li>Type.argument_types</li> |
| 183 | <li>Type.element_type (property)</li> |
| 184 | <li>Type.element_count (property)</li> |
| 185 | <li>Type.is_function_variadic</li> |
| 186 | <li>Type.is_pod</li> |
| 187 | <li>Type.get_array_element_type</li> |
| 188 | <li>Type.get_array_size</li> |
| 189 | <li>Type.__eq__ and Type.__ne__</li> |
| 190 | <li>File.from_name (static)</li> |
| 191 | <li>File.__str__ and File.__repr__</li> |
| 192 | </ul> |
| 193 | |
Chandler Carruth | c00c0c3 | 2011-11-28 07:16:19 +0000 | [diff] [blame] | 194 | <!-- ======================================================================= --> |
| 195 | <h2 id="knownproblems">Significant Known Problems</h2> |
| 196 | <!-- ======================================================================= --> |
| 197 | |
| 198 | <!-- ======================================================================= --> |
| 199 | <h2 id="additionalinfo">Additional Information</h2> |
| 200 | <!-- ======================================================================= --> |
| 201 | |
| 202 | <p>A wide variety of additional information is available on the |
| 203 | <a href="http://clang.llvm.org/">Clang web page</a>. The web page contains |
| 204 | versions of the API documentation which are up-to-date with the Subversion |
| 205 | version of the source code. You can access versions of these documents specific |
| 206 | to this release by going into the "<tt>clang/doc/</tt>" directory in the Clang |
| 207 | tree.</p> |
| 208 | |
| 209 | <p>If you have any questions or comments about Clang, please feel free to |
| 210 | contact us via the <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev"> |
| 211 | mailing list</a>.</p> |
| 212 | |
Chandler Carruth | 59abf06 | 2011-11-28 22:12:44 +0000 | [diff] [blame] | 213 | |
| 214 | <!-- ======================================================================= --> |
| 215 | <!-- Likely 3.1 release notes --> |
| 216 | <!-- ======================================================================= --> |
| 217 | <!-- |
| 218 | This is just a section to hold things that have already gotten started and |
| 219 | should likely pick up proper release notes in 3.1. |
| 220 | |
| 221 | - C1X and C++11 atomics infrastructure and support |
| 222 | - CUDA support? |
| 223 | |
| 224 | --> |
| 225 | |
Benjamin Kramer | 665a8dc | 2012-01-15 15:26:07 +0000 | [diff] [blame] | 226 | </div> |
Chandler Carruth | c00c0c3 | 2011-11-28 07:16:19 +0000 | [diff] [blame] | 227 | </body> |
| 228 | </html> |