Chandler Carruth | c00c0c3 | 2011-11-28 07:16:19 +0000 | [diff] [blame] | 1 | <html> |
| 2 | <head> |
| 3 | <title>Clang 3.0 Release Notes</title> |
| 4 | <link type="text/css" rel="stylesheet" href="../menu.css" /> |
| 5 | <link type="text/css" rel="stylesheet" href="../content.css" /> |
| 6 | <style type="text/css"> |
| 7 | td { |
| 8 | vertical-align: top; |
| 9 | } |
| 10 | </style> |
| 11 | </head> |
| 12 | <body> |
| 13 | |
| 14 | <!--#include virtual="../menu.html.incl"--> |
| 15 | |
| 16 | <div id="content"> |
| 17 | |
| 18 | <h1>Clang 3.0 Release Notes</h1> |
| 19 | |
| 20 | <img align=right src="http://llvm.org/img/DragonSmall.png" |
| 21 | width="136" height="136" alt="LLVM Dragon Logo"> |
| 22 | |
| 23 | <ul> |
| 24 | <li><a href="#intro">Introduction</a></li> |
| 25 | <li><a href="#whatsnew">What's New in Clang 3.0?</a> |
| 26 | <ul> |
| 27 | <li><a href="#majorfeatures">Major New Features</a></li> |
| 28 | <li><a href="#cchanges">C Language Changes</a></li> |
| 29 | <li><a href="#cxxhanges">C++ Language Changes</a></li> |
| 30 | <li><a href="#objchanges">Objective-C Language Changes</a></li> |
| 31 | <li><a href="#apichanges">Internal API Changes</a></li> |
Richard Smith | 855746b | 2011-11-28 20:02:05 +0000 | [diff] [blame] | 32 | </ul> |
Chandler Carruth | c00c0c3 | 2011-11-28 07:16:19 +0000 | [diff] [blame] | 33 | </li> |
| 34 | <li><a href="#knownproblems">Known Problems</a></li> |
| 35 | <li><a href="#additionalinfo">Additional Information</a></li> |
| 36 | </ul> |
| 37 | |
| 38 | <div class="doc_author"> |
| 39 | <p>Written by the <a href="http://llvm.org/">LLVM Team</a></p> |
| 40 | </div> |
| 41 | |
| 42 | <!-- |
| 43 | <h1 style="color:red">These are in-progress notes for the upcoming LLVM 3.0 |
| 44 | release.<br> |
| 45 | You may prefer the |
| 46 | <a href="http://llvm.org/releases/2.9/docs/ReleaseNotes.html">LLVM 2.9 |
| 47 | Release Notes</a>.</h1> |
| 48 | --> |
| 49 | |
| 50 | <!-- ======================================================================= --> |
| 51 | <h2 id="intro">Introduction</h2> |
| 52 | <!-- ======================================================================= --> |
| 53 | |
| 54 | <p>This document contains the release notes for the Clang C/C++/Objective-C |
| 55 | frontend, part of the LLVM Compiler Infrastructure, release 3.0. Here we |
| 56 | describe the status of Clang in some detail, including major improvements from |
| 57 | the previous release and new feature work. For the general LLVM release notes, |
| 58 | see <a href ="http;//llvm.org/docs/ReleaseNotes.html">the LLVM |
| 59 | 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 |
| 63 | latest 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 |
| 68 | Clang web page, this document applies to the <i>next</i> release, not the |
| 69 | current 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 | <!-- ======================================================================= --> |
| 73 | <h2 id="whatsnew">What's New in Clang 3.0?</h2> |
| 74 | <!-- ======================================================================= --> |
| 75 | |
| 76 | <p>Some of the major new features and improvements to Clang are listed here. |
| 77 | Generic improvements to Clang as a whole or two its underlying infrastructure |
| 78 | are described first, followed by language-specific sections with improvements to |
| 79 | Clang's support for those languages.</p> |
| 80 | |
| 81 | <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = --> |
| 82 | <h3 id="majorfeatures">Major New Features</h3> |
| 83 | <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = --> |
| 84 | |
Chandler Carruth | a3950cc | 2011-11-28 08:41:06 +0000 | [diff] [blame] | 85 | <h4 id="notes">Unorganized Notes</h4> |
| 86 | <p>These are completely random notes as I'm organizing my thoughts and reviewing |
| 87 | the history. Anything still here needs to be distilled and turned into proper |
| 88 | prose in a section of its own. When doing that, delete the notes.</p> |
| 89 | <ul> |
Chandler Carruth | a3950cc | 2011-11-28 08:41:06 +0000 | [diff] [blame] | 90 | <li>OpenCL support -- need details from Tanya and Peter -- separate language |
| 91 | section?</li> |
| 92 | <li>Building Clang on windows -- mingw, 32 and 64 bit, native windows builds, |
| 93 | cygwin. get chapuni to flesh out details.</li> |
Chandler Carruth | 1af4022 | 2011-11-28 09:43:30 +0000 | [diff] [blame] | 94 | <li>Compiling C/C++ w/ MinGW (32/64) and Cygwin on Windows -- chapuni</li> |
| 95 | <li>C++ -- Parsing and AST support for Windows Structured Exception |
| 96 | Handling.</li> |
Chandler Carruth | a3950cc | 2011-11-28 08:41:06 +0000 | [diff] [blame] | 97 | <li>Uninitialized values Clang warning rewrite -- more accurate, faster, able |
| 98 | to differentiate between the possibility of an uninitialized use and the |
| 99 | certainty of an uninitialized use.</li> |
Chandler Carruth | a3950cc | 2011-11-28 08:41:06 +0000 | [diff] [blame] | 100 | <li>Support for language specific address spaces</li> |
Chandler Carruth | 1af4022 | 2011-11-28 09:43:30 +0000 | [diff] [blame] | 101 | <li>Support for compiling on NetBSD systems -- Joerg Sonnenberger to fill |
| 102 | out</li> |
Chandler Carruth | a3950cc | 2011-11-28 08:41:06 +0000 | [diff] [blame] | 103 | <li>Support for '--sysroot' based cross-compilation</li> |
| 104 | <li>Crash recovery handling for libclang clients -- Ted</li> |
| 105 | <li>Driver support for automatic preparation of reproduction steps for |
| 106 | compiler crashes -- Chad</li> |
| 107 | <li>OS Availability attribute -- r128127</li> |
| 108 | <li>GNU ObjectiveC Runtime support -- David Chisnall</li> |
Chandler Carruth | a3950cc | 2011-11-28 08:41:06 +0000 | [diff] [blame] | 109 | <li>Diagnostic improvements bucket? |
| 110 | <ul> |
| 111 | <li>Emitting fewer include stacks</li> |
Chandler Carruth | 1af4022 | 2011-11-28 09:43:30 +0000 | [diff] [blame] | 112 | <li>Significantly better recovery when encountering misspelled type names |
| 113 | in a declaration context. r130082</li> |
Chandler Carruth | b6a1d9d | 2011-11-28 11:27:33 +0000 | [diff] [blame] | 114 | <li>Expanded typo correction, most especially namespace-aware typo |
| 115 | correction in C++</li> |
Chandler Carruth | 5d46a50 | 2011-11-28 12:24:21 +0000 | [diff] [blame] | 116 | <li>Significantly more rich diagnostics w.r.t. macro expansion backtraces, |
| 117 | especially when macro arguments are involved.</li> |
Chandler Carruth | a3950cc | 2011-11-28 08:41:06 +0000 | [diff] [blame] | 118 | </ul> |
| 119 | </li> |
Douglas Gregor | 7c304c4 | 2011-11-28 17:50:36 +0000 | [diff] [blame] | 120 | <li>libclang improvements bucket |
Chandler Carruth | 7717ce4 | 2011-11-28 12:24:23 +0000 | [diff] [blame] | 121 | <ul> |
| 122 | <li>Better Python Bindings</li> |
| 123 | <li>More AST coverage</li> |
| 124 | <li>Improved cursor support within macros, especially function-style macro |
| 125 | arguments.</li> |
| 126 | <li>Improved code completion surrounding macros, macro arguments, and |
| 127 | token pasting.</li> |
Douglas Gregor | 7c304c4 | 2011-11-28 17:50:36 +0000 | [diff] [blame] | 128 | <li>Improved code completion for in-class member functions.</li> |
Chandler Carruth | 7717ce4 | 2011-11-28 12:24:23 +0000 | [diff] [blame] | 129 | </ul> |
| 130 | </li> |
Anna Zaks | a5a6d1d | 2011-11-28 21:31:55 +0000 | [diff] [blame] | 131 | <li>Basic C++ support in the static analyzer.</li> |
Chandler Carruth | 1af4022 | 2011-11-28 09:43:30 +0000 | [diff] [blame] | 132 | <li>Improved AST support for partially constructed nodes and incomplete |
| 133 | information for LLDB and other clients which dynamically build AST nodes.</li> |
| 134 | <li>Largely complete MSVC-compatible parsing mode -- fpichet</li> |
| 135 | <li>C1X -- static asserts and generic selections</li> |
Chandler Carruth | 1af4022 | 2011-11-28 09:43:30 +0000 | [diff] [blame] | 136 | <li>Memory reduction -- initializers, macro expansions, source locations, |
| 137 | etc.</li> |
Richard Smith | 855746b | 2011-11-28 20:02:05 +0000 | [diff] [blame] | 138 | <li>The Embarcadero |
| 139 | <a href="http://docwiki.embarcadero.com/RADStudio/en/Is_lvalue_expr"><tt>__is_lvalue_expr</tt></a> and |
| 140 | <a href="http://docwiki.embarcadero.com/RADStudio/en/Is_rvalue_expr"><tt>__is_rvalue_expr</tt></a> expression traits.</li> |
Chandler Carruth | bba72a8 | 2011-11-28 10:57:14 +0000 | [diff] [blame] | 141 | <li>CFI-based debug info -- nlewycky/espindola details</li> |
Chandler Carruth | b6a1d9d | 2011-11-28 11:27:33 +0000 | [diff] [blame] | 142 | <li>ObjC ARC -- get a blurb from rjmccall</li> |
Douglas Gregor | a1e3e8c | 2011-11-28 17:51:39 +0000 | [diff] [blame] | 143 | <li>ObjC related result type/instancetype</li> |
Chandler Carruth | 7717ce4 | 2011-11-28 12:24:23 +0000 | [diff] [blame] | 144 | <li>Thread Safety attributes and correctness analysis added to Clang.</li> |
Chandler Carruth | 7a1f148 | 2011-11-28 13:02:29 +0000 | [diff] [blame] | 145 | <li>NRVO for blocks.</li> |
| 146 | <li>Major improvements to the interactions between serializing and |
| 147 | deserializing the AST and the preprocessor -- argiris</li> |
Chandler Carruth | 7a1f148 | 2011-11-28 13:02:29 +0000 | [diff] [blame] | 148 | <li>Major driver and system compatibility changes: |
| 149 | <ul> |
| 150 | <li>Correct support for many more hardware architecture pre-defined macros |
| 151 | (e.g., __i686__).</li> |
| 152 | <li>Much more robust detection of library and header search paths on Linux |
| 153 | distributions.</li> |
| 154 | <li>Partial support for sysroot based cross compiling on Linux (like) |
| 155 | systems.</li> |
| 156 | <li>Improved support for locating and using libcxx, especially on |
| 157 | Darwin.</li> |
| 158 | </ul> |
| 159 | </li> |
| 160 | <li>Initial steps of CUDA support -- Peter</li> |
| 161 | <li>Atomic builtins and C1X specifiers using the new LLVM atomic instructions |
| 162 | and memory model -- efriedma, jyasskin</li> |
Chandler Carruth | a3950cc | 2011-11-28 08:41:06 +0000 | [diff] [blame] | 163 | </ul> |
| 164 | |
Chandler Carruth | c6f2af3 | 2011-11-28 19:17:25 +0000 | [diff] [blame] | 165 | <h4 id="ppcallbacks">Expanded support for instrumenting the preprocessor through |
| 166 | callbacks</h4> |
Chandler Carruth | f16d725 | 2011-11-28 21:47:51 +0000 | [diff] [blame] | 167 | Several enhancements were made to the <code>PPCallbacks</code> interface to |
| 168 | expand the information available to tools and library users of Clang that wish |
| 169 | to introspect the preprocessing. |
Chandler Carruth | c6f2af3 | 2011-11-28 19:17:25 +0000 | [diff] [blame] | 170 | <ul> |
| 171 | <li>The exact text used between the <code>""</code>s or <code><></code>s is reported.</li> |
| 172 | <li>The header search path used to locate the header is reported.</li> |
| 173 | <li>Missing files during including headers reported.</li> |
| 174 | <li>The exact source range for expanded macros can be retrieved.</li> |
| 175 | </ul> |
| 176 | |
Chandler Carruth | c00c0c3 | 2011-11-28 07:16:19 +0000 | [diff] [blame] | 177 | <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = --> |
| 178 | <h3 id="cchanges">C Language Changes in Clang</h3> |
| 179 | <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = --> |
| 180 | |
| 181 | <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = --> |
| 182 | <h3 id="cxxchanges">C++ Language Changes in Clang</h3> |
| 183 | <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = --> |
| 184 | |
Richard Smith | 855746b | 2011-11-28 20:02:05 +0000 | [diff] [blame] | 185 | <h4 id="cxx11changes">C++11 Feature Support</h4> |
Richard Smith | 855746b | 2011-11-28 20:02:05 +0000 | [diff] [blame] | 186 | <p>Clang 3.0 adds support for |
| 187 | <a href="http://clang.llvm.org/cxx_status.html#cxx11">more of the language |
| 188 | features</a> added in the latest ISO C++ standard, C++11. Use |
Chandler Carruth | f16d725 | 2011-11-28 21:47:51 +0000 | [diff] [blame] | 189 | <code>-std=c++11</code> or <code>-std=gnu++11</code> to enable support for these |
Richard Smith | 855746b | 2011-11-28 20:02:05 +0000 | [diff] [blame] | 190 | features. The following are now considered to be of production quality: |
| 191 | <ul> |
Chandler Carruth | f16d725 | 2011-11-28 21:47:51 +0000 | [diff] [blame] | 192 | <li>Range-based <code>for</code> loops</li> |
| 193 | <li>Alias declarations (a new syntax for <code>typedef</code> declarations), |
| 194 | including their <code>template</code> forms</li> |
Richard Smith | 855746b | 2011-11-28 20:02:05 +0000 | [diff] [blame] | 195 | <li>Specifying default values for class data members within a class |
| 196 | definition</li> |
| 197 | <li>Constructors delegating to other constructors of the same class</li> |
Chandler Carruth | f16d725 | 2011-11-28 21:47:51 +0000 | [diff] [blame] | 198 | <li>The <code>override</code> context-sensitive keyword for virtual member |
Richard Smith | 855746b | 2011-11-28 20:02:05 +0000 | [diff] [blame] | 199 | function declarations</li> |
Chandler Carruth | f16d725 | 2011-11-28 21:47:51 +0000 | [diff] [blame] | 200 | <li>Explicitly generating default function definitions with |
| 201 | <code>= default</code></li> |
| 202 | <li>The <code>nullptr</code> keyword, and the corresponding type</li> |
Richard Smith | 855746b | 2011-11-28 20:02:05 +0000 | [diff] [blame] | 203 | <li>Raw string literals with arbitary delimiters (for instance, |
Chandler Carruth | f16d725 | 2011-11-28 21:47:51 +0000 | [diff] [blame] | 204 | <code>R"delim(str"ing)delim"</code>)</li> |
| 205 | <li>Unicode string literals (for instance, <code>U"\u1234"</code>) and the |
| 206 | <code>char16_t</code> and <code>char32_t</code> built-in types |
| 207 | <li><code>noexcept</code> expressions and the <code>noexcept</code> specifier |
| 208 | on function declarations</li> |
| 209 | <li><code>alignof</code> expressions and the <code>alignas</code> specifier on |
Richard Smith | 855746b | 2011-11-28 20:02:05 +0000 | [diff] [blame] | 210 | variable declarations</li> |
| 211 | <li>A full set of <a href="http://clang.llvm.org/docs/LanguageExtensions.html#checking_type_traits">type traits</a>, |
| 212 | sufficient to support C++11 standard libraries</li> |
| 213 | </ul> |
Chandler Carruth | bc02a04 | 2011-11-28 21:55:34 +0000 | [diff] [blame^] | 214 | All warning and language selection flags which previously accepted |
| 215 | <code>c++0x</code> now accept <code>c++11</code>. The old <code>c++0x</code> |
| 216 | form remains as an alias. |
Richard Smith | 855746b | 2011-11-28 20:02:05 +0000 | [diff] [blame] | 217 | |
Chandler Carruth | c00c0c3 | 2011-11-28 07:16:19 +0000 | [diff] [blame] | 218 | <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = --> |
| 219 | <h3 id="objcchanges">Objective-C Language Changes in Clang</h3> |
| 220 | <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = --> |
| 221 | |
| 222 | <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = --> |
| 223 | <h3 id="apichanges">Internal API Changes</h3> |
| 224 | <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = --> |
| 225 | |
Chandler Carruth | c4dbffa | 2011-11-28 18:55:47 +0000 | [diff] [blame] | 226 | These are major API changes that have happened since the 2.9 release of Clang. |
| 227 | If upgrading an external codebase that uses Clang as a library, this section |
| 228 | should help get you past the largest hurdles of upgrading. |
| 229 | |
Chandler Carruth | 7d727b7 | 2011-11-28 19:06:34 +0000 | [diff] [blame] | 230 | <h4 id="macroexpansion">Switched terminology from "instantiation" to "expansion" |
| 231 | for macros</h4> |
| 232 | A great deal of comments and code changes fell out of this, but also every API |
| 233 | relating to macros with the word "instantiation" (or some variant thereof) was |
| 234 | renamed. An incomplete list of the most note-worthy ones is here: |
| 235 | <ul> |
| 236 | <li><code>MacroInstantiation</code> became <code>MacroExpansion</code></li> |
| 237 | <li><code>SourceManager::getInstantiationLoc</code> became |
| 238 | <code>SourceManager::getExpansionLoc</code></li> |
| 239 | <li><code>SourceManager::getInstantiationRange</code> became |
| 240 | <code>SourceManager::getExpansionRange</code></li> |
| 241 | <li><code>SourceManager::getImmediateInstantiationRange</code> became |
| 242 | <code>SourceManager::getImmediateExpansionRange</code></li> |
| 243 | <li><code>SourceManager::getDecomposedInstantiationLoc</code> became |
| 244 | <code>SourceManager::getDecomposedExpansionLoc</code></li> |
| 245 | <li><code>SourceManager::getInstantiationColumnNumber</code> became |
| 246 | <code>SourceManager::getExpansionColumnNumber</code></li> |
| 247 | <li><code>SourceManager::getInstantiationLineNumber</code> became |
| 248 | <code>SourceManager::getExpansionLineNumber</code></li> |
| 249 | <!-- TODO: Make this more complete! --> |
| 250 | </ul> |
| 251 | |
Chandler Carruth | c4dbffa | 2011-11-28 18:55:47 +0000 | [diff] [blame] | 252 | <h4 id="diagnosticrename">Diagnostic class names were shuffled</h4> |
| 253 | <ul> |
| 254 | <li><code>Diagnostic</code> became <code>DiagnosticEngine</code></li> |
| 255 | <li><code>DiagnosticClient</code> became <code>DiagnosticConsumer</code></li> |
| 256 | <li><code>DiagnosticInfo</code> became <code>Diagnostic</code></li> |
| 257 | </ul> |
| 258 | Subclasses of <code>DiagnosticConsumer</code> were also then renamed to end with |
| 259 | <code>Consumer</code>. |
| 260 | |
Chandler Carruth | c00c0c3 | 2011-11-28 07:16:19 +0000 | [diff] [blame] | 261 | <!-- ======================================================================= --> |
| 262 | <h2 id="knownproblems">Significant Known Problems</h2> |
| 263 | <!-- ======================================================================= --> |
| 264 | |
| 265 | <!-- ======================================================================= --> |
| 266 | <h2 id="additionalinfo">Additional Information</h2> |
| 267 | <!-- ======================================================================= --> |
| 268 | |
| 269 | <p>A wide variety of additional information is available on the |
| 270 | <a href="http://clang.llvm.org/">Clang web page</a>. The web page contains |
| 271 | versions of the API documentation which are up-to-date with the Subversion |
| 272 | version of the source code. You can access versions of these documents specific |
| 273 | to this release by going into the "<tt>clang/doc/</tt>" directory in the Clang |
| 274 | tree.</p> |
| 275 | |
| 276 | <p>If you have any questions or comments about Clang, please feel free to |
| 277 | contact us via the <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev"> |
| 278 | mailing list</a>.</p> |
| 279 | |
| 280 | </body> |
| 281 | </html> |