| 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> | 
 | 32 |   </li> | 
 | 33 |   <li><a href="#knownproblems">Known Problems</a></li> | 
 | 34 |   <li><a href="#additionalinfo">Additional Information</a></li> | 
 | 35 | </ul> | 
 | 36 |  | 
 | 37 | <div class="doc_author"> | 
 | 38 |   <p>Written by the <a href="http://llvm.org/">LLVM Team</a></p> | 
 | 39 | </div> | 
 | 40 |  | 
 | 41 | <!-- | 
 | 42 | <h1 style="color:red">These are in-progress notes for the upcoming LLVM 3.0 | 
 | 43 | release.<br> | 
 | 44 | You may prefer the | 
 | 45 | <a href="http://llvm.org/releases/2.9/docs/ReleaseNotes.html">LLVM 2.9 | 
 | 46 | Release Notes</a>.</h1> | 
 | 47 |  --> | 
 | 48 |  | 
 | 49 | <!-- ======================================================================= --> | 
 | 50 | <h2 id="intro">Introduction</h2> | 
 | 51 | <!-- ======================================================================= --> | 
 | 52 |  | 
 | 53 | <p>This document contains the release notes for the Clang C/C++/Objective-C | 
 | 54 | frontend, part of the LLVM Compiler Infrastructure, release 3.0.  Here we | 
 | 55 | describe the status of Clang in some detail, including major improvements from | 
 | 56 | the previous release and new feature work. For the general LLVM release notes, | 
 | 57 | see <a href ="http;//llvm.org/docs/ReleaseNotes.html">the LLVM | 
 | 58 |  documentation</a>. All LLVM releases may be downloaded from the | 
 | 59 | <a href="http://llvm.org/releases/">LLVM releases web site</a>.</p> | 
 | 60 |  | 
 | 61 | <p>For more information about Clang or LLVM, including information about the | 
 | 62 | latest release, please check out the main please see the | 
 | 63 | <a href="http://clang.llvm.org">Clang Web Site</a> or the | 
 | 64 | <a href="http://llvm.org">LLVM Web Site</a>. | 
 | 65 |  | 
 | 66 | <p>Note that if you are reading this file from a Subversion checkout or the main | 
 | 67 | Clang web page, this document applies to the <i>next</i> release, not the | 
 | 68 | current one.  To see the release notes for a specific release, please see the | 
 | 69 | <a href="http://llvm.org/releases/">releases page</a>.</p> | 
 | 70 |  | 
 | 71 | <!-- ======================================================================= --> | 
 | 72 | <h2 id="whatsnew">What's New in Clang 3.0?</h2> | 
 | 73 | <!-- ======================================================================= --> | 
 | 74 |  | 
 | 75 | <p>Some of the major new features and improvements to Clang are listed here. | 
 | 76 | Generic improvements to Clang as a whole or two its underlying infrastructure | 
 | 77 | are described first, followed by language-specific sections with improvements to | 
 | 78 | Clang's support for those languages.</p> | 
 | 79 |  | 
 | 80 | <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = --> | 
 | 81 | <h3 id="majorfeatures">Major New Features</h3> | 
 | 82 | <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = --> | 
 | 83 |  | 
| Chandler Carruth | a3950cc | 2011-11-28 08:41:06 +0000 | [diff] [blame] | 84 | <h4 id="notes">Unorganized Notes</h4> | 
 | 85 | <p>These are completely random notes as I'm organizing my thoughts and reviewing | 
 | 86 | the history. Anything still here needs to be distilled and turned into proper | 
 | 87 | prose in a section of its own. When doing that, delete the notes.</p> | 
 | 88 | <ul> | 
 | 89 |   <li>Make analyzer (especially as used w/ warnings in Clang) much faster</li> | 
 | 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>C++11 -- noexcept (Sebastian Redl)</li> | 
 | 98 |   <li>Uninitialized values Clang warning rewrite -- more accurate, faster, able | 
 | 99 |   to differentiate between the possibility of an uninitialized use and the | 
 | 100 |   certainty of an uninitialized use.</li> | 
| Chandler Carruth | a3950cc | 2011-11-28 08:41:06 +0000 | [diff] [blame] | 101 |   <li>Support for language specific address spaces</li> | 
| Chandler Carruth | 1af4022 | 2011-11-28 09:43:30 +0000 | [diff] [blame] | 102 |   <li>Support for compiling on NetBSD systems -- Joerg Sonnenberger to fill | 
 | 103 |   out</li> | 
| Chandler Carruth | a3950cc | 2011-11-28 08:41:06 +0000 | [diff] [blame] | 104 |   <li>Support for '--sysroot' based cross-compilation</li> | 
 | 105 |   <li>Crash recovery handling for libclang clients -- Ted</li> | 
 | 106 |   <li>Driver support for automatic preparation of reproduction steps for | 
 | 107 |   compiler crashes -- Chad</li> | 
 | 108 |   <li>OS Availability attribute -- r128127</li> | 
 | 109 |   <li>GNU ObjectiveC Runtime support -- David Chisnall</li> | 
 | 110 |   <li>C++11 -- override</li> | 
 | 111 |   <li>Diagnostic improvements bucket? | 
 | 112 |     <ul> | 
 | 113 |       <li>Emitting fewer include stacks</li> | 
| Chandler Carruth | 1af4022 | 2011-11-28 09:43:30 +0000 | [diff] [blame] | 114 |       <li>Significantly better recovery when encountering misspelled type names | 
 | 115 |       in a declaration context. r130082</li> | 
| Chandler Carruth | b6a1d9d | 2011-11-28 11:27:33 +0000 | [diff] [blame] | 116 |       <li>Expanded typo correction, most especially namespace-aware typo | 
 | 117 |       correction in C++</li> | 
| Chandler Carruth | 5d46a50 | 2011-11-28 12:24:21 +0000 | [diff] [blame] | 118 |       <li>Significantly more rich diagnostics w.r.t. macro expansion backtraces, | 
 | 119 |       especially when macro arguments are involved.</li> | 
| Chandler Carruth | a3950cc | 2011-11-28 08:41:06 +0000 | [diff] [blame] | 120 |     </ul> | 
 | 121 |   </li> | 
| Douglas Gregor | 7c304c4 | 2011-11-28 17:50:36 +0000 | [diff] [blame] | 122 |   <li>libclang improvements bucket | 
| Chandler Carruth | 7717ce4 | 2011-11-28 12:24:23 +0000 | [diff] [blame] | 123 |     <ul> | 
 | 124 |       <li>Better Python Bindings</li> | 
 | 125 |       <li>More AST coverage</li> | 
 | 126 |       <li>Improved cursor support within macros, especially function-style macro | 
 | 127 |       arguments.</li> | 
 | 128 |       <li>Improved code completion surrounding macros, macro arguments, and | 
 | 129 |       token pasting.</li> | 
| Douglas Gregor | 7c304c4 | 2011-11-28 17:50:36 +0000 | [diff] [blame] | 130 |       <li>Improved code completion for in-class member functions.</li> | 
| Chandler Carruth | 7717ce4 | 2011-11-28 12:24:23 +0000 | [diff] [blame] | 131 |     </ul> | 
 | 132 |   </li> | 
| Chandler Carruth | a3950cc | 2011-11-28 08:41:06 +0000 | [diff] [blame] | 133 |   <li>C++ -- supported in the static analyzer: methods, new, constructors, | 
 | 134 |   destructors, etc.</li> | 
| Chandler Carruth | 1af4022 | 2011-11-28 09:43:30 +0000 | [diff] [blame] | 135 |   <li>Improved AST support for partially constructed nodes and incomplete | 
 | 136 |   information for LLDB and other clients which dynamically build AST nodes.</li> | 
 | 137 |   <li>Largely complete MSVC-compatible parsing mode -- fpichet</li> | 
 | 138 |   <li>C1X -- static asserts and generic selections</li> | 
 | 139 |   <li>C++11 -- alias declarations -- zygoloid</li> | 
 | 140 |   <li>C++11 -- range-based-for loops -- zygoloid</li> | 
| Chandler Carruth | bba72a8 | 2011-11-28 10:57:14 +0000 | [diff] [blame] | 141 |   <li>C++11 -- nullptr -- zygoloid</li> | 
| Chandler Carruth | b6a1d9d | 2011-11-28 11:27:33 +0000 | [diff] [blame] | 142 |   <li>C++11 -- in-class init -- zygoloid</li> | 
| Chandler Carruth | 7717ce4 | 2011-11-28 12:24:23 +0000 | [diff] [blame] | 143 |   <li>C++11 -- raw string literals -- zygoloid</li> | 
| Douglas Gregor | 7c304c4 | 2011-11-28 17:50:36 +0000 | [diff] [blame] | 144 |   <li>C++11 -- delegating ctors -- zygoloid/scshunt</li> | 
| Chandler Carruth | 1af4022 | 2011-11-28 09:43:30 +0000 | [diff] [blame] | 145 |   <li>Memory reduction -- initializers, macro expansions, source locations, | 
 | 146 |   etc.</li> | 
 | 147 |   <li>Full set of type traits, sufficient to support C++11 standard libraries; | 
 | 148 |   also expression traits.</li> | 
| Chandler Carruth | bba72a8 | 2011-11-28 10:57:14 +0000 | [diff] [blame] | 149 |   <li>CFI-based debug info -- nlewycky/espindola details</li> | 
| Chandler Carruth | b6a1d9d | 2011-11-28 11:27:33 +0000 | [diff] [blame] | 150 |   <li>ObjC ARC -- get a blurb from rjmccall</li> | 
| Douglas Gregor | a1e3e8c | 2011-11-28 17:51:39 +0000 | [diff] [blame] | 151 |   <li>ObjC related result type/instancetype</li> | 
| Chandler Carruth | 7717ce4 | 2011-11-28 12:24:23 +0000 | [diff] [blame] | 152 |   <li>Thread Safety attributes and correctness analysis added to Clang.</li> | 
| Chandler Carruth | 7a1f148 | 2011-11-28 13:02:29 +0000 | [diff] [blame] | 153 |   <li>NRVO for blocks.</li> | 
 | 154 |   <li>Major improvements to the interactions between serializing and | 
 | 155 |   deserializing the AST and the preprocessor -- argiris</li> | 
| Chandler Carruth | 7a1f148 | 2011-11-28 13:02:29 +0000 | [diff] [blame] | 156 |   <li>Major driver and system compatibility changes: | 
 | 157 |     <ul> | 
 | 158 |       <li>Correct support for many more hardware architecture pre-defined macros | 
 | 159 |       (e.g., __i686__).</li> | 
 | 160 |       <li>Much more robust detection of library and header search paths on Linux | 
 | 161 |       distributions.</li> | 
 | 162 |       <li>Partial support for sysroot based cross compiling on Linux (like) | 
 | 163 |       systems.</li> | 
 | 164 |       <li>Improved support for locating and using libcxx, especially on | 
 | 165 |       Darwin.</li> | 
 | 166 |     </ul> | 
 | 167 |   </li> | 
 | 168 |   <li>Initial steps of CUDA support -- Peter</li> | 
 | 169 |   <li>Atomic builtins and C1X specifiers using the new LLVM atomic instructions | 
 | 170 |   and memory model -- efriedma, jyasskin</li> | 
| Chandler Carruth | a3950cc | 2011-11-28 08:41:06 +0000 | [diff] [blame] | 171 | </ul> | 
 | 172 |  | 
| Chandler Carruth | c6f2af3 | 2011-11-28 19:17:25 +0000 | [diff] [blame] | 173 | <h4 id="ppcallbacks">Expanded support for instrumenting the preprocessor through | 
 | 174 |   callbacks</h4> | 
 | 175 | Several enhancements were made to the <code>PPCallbacks</code> interface to expand the information available to tools and library users of Clang that wish to introspect the preprocessing. | 
 | 176 | <ul> | 
 | 177 |   <li>The exact text used between the <code>""</code>s or <code><></code>s is reported.</li> | 
 | 178 |   <li>The header search path used to locate the header is reported.</li> | 
 | 179 |   <li>Missing files during including headers reported.</li> | 
 | 180 |   <li>The exact source range for expanded macros can be retrieved.</li> | 
 | 181 | </ul> | 
 | 182 |  | 
| Chandler Carruth | c00c0c3 | 2011-11-28 07:16:19 +0000 | [diff] [blame] | 183 | <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = --> | 
 | 184 | <h3 id="cchanges">C Language Changes in Clang</h3> | 
 | 185 | <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = --> | 
 | 186 |  | 
 | 187 | <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = --> | 
 | 188 | <h3 id="cxxchanges">C++ Language Changes in Clang</h3> | 
 | 189 | <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = --> | 
 | 190 |  | 
 | 191 | <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = --> | 
 | 192 | <h3 id="objcchanges">Objective-C Language Changes in Clang</h3> | 
 | 193 | <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = --> | 
 | 194 |  | 
 | 195 | <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = --> | 
 | 196 | <h3 id="apichanges">Internal API Changes</h3> | 
 | 197 | <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = --> | 
 | 198 |  | 
| Chandler Carruth | c4dbffa | 2011-11-28 18:55:47 +0000 | [diff] [blame] | 199 | These are major API changes that have happened since the 2.9 release of Clang. | 
 | 200 | If upgrading an external codebase that uses Clang as a library, this section | 
 | 201 | should help get you past the largest hurdles of upgrading. | 
 | 202 |  | 
| Chandler Carruth | 7d727b7 | 2011-11-28 19:06:34 +0000 | [diff] [blame] | 203 | <h4 id="macroexpansion">Switched terminology from "instantiation" to "expansion" | 
 | 204 |   for macros</h4> | 
 | 205 | A great deal of comments and code changes fell out of this, but also every API | 
 | 206 | relating to macros with the word "instantiation" (or some variant thereof) was | 
 | 207 | renamed. An incomplete list of the most note-worthy ones is here: | 
 | 208 | <ul> | 
 | 209 |   <li><code>MacroInstantiation</code> became <code>MacroExpansion</code></li> | 
 | 210 |   <li><code>SourceManager::getInstantiationLoc</code> became | 
 | 211 |   <code>SourceManager::getExpansionLoc</code></li> | 
 | 212 |   <li><code>SourceManager::getInstantiationRange</code> became | 
 | 213 |   <code>SourceManager::getExpansionRange</code></li> | 
 | 214 |   <li><code>SourceManager::getImmediateInstantiationRange</code> became | 
 | 215 |   <code>SourceManager::getImmediateExpansionRange</code></li> | 
 | 216 |   <li><code>SourceManager::getDecomposedInstantiationLoc</code> became | 
 | 217 |   <code>SourceManager::getDecomposedExpansionLoc</code></li> | 
 | 218 |   <li><code>SourceManager::getInstantiationColumnNumber</code> became | 
 | 219 |   <code>SourceManager::getExpansionColumnNumber</code></li> | 
 | 220 |   <li><code>SourceManager::getInstantiationLineNumber</code> became | 
 | 221 |   <code>SourceManager::getExpansionLineNumber</code></li> | 
 | 222 |   <!-- TODO: Make this more complete! --> | 
 | 223 | </ul> | 
 | 224 |  | 
| Chandler Carruth | c4dbffa | 2011-11-28 18:55:47 +0000 | [diff] [blame] | 225 | <h4 id="diagnosticrename">Diagnostic class names were shuffled</h4> | 
 | 226 | <ul> | 
 | 227 |   <li><code>Diagnostic</code> became <code>DiagnosticEngine</code></li> | 
 | 228 |   <li><code>DiagnosticClient</code> became <code>DiagnosticConsumer</code></li> | 
 | 229 |   <li><code>DiagnosticInfo</code> became <code>Diagnostic</code></li> | 
 | 230 | </ul> | 
 | 231 | Subclasses of <code>DiagnosticConsumer</code> were also then renamed to end with | 
 | 232 | <code>Consumer</code>. | 
 | 233 |  | 
| Chandler Carruth | c00c0c3 | 2011-11-28 07:16:19 +0000 | [diff] [blame] | 234 | <!-- ======================================================================= --> | 
 | 235 | <h2 id="knownproblems">Significant Known Problems</h2> | 
 | 236 | <!-- ======================================================================= --> | 
 | 237 |  | 
 | 238 | <!-- ======================================================================= --> | 
 | 239 | <h2 id="additionalinfo">Additional Information</h2> | 
 | 240 | <!-- ======================================================================= --> | 
 | 241 |  | 
 | 242 | <p>A wide variety of additional information is available on the | 
 | 243 | <a href="http://clang.llvm.org/">Clang web page</a>.  The web page contains | 
 | 244 | versions of the API documentation which are up-to-date with the Subversion | 
 | 245 | version of the source code.  You can access versions of these documents specific | 
 | 246 | to this release by going into the "<tt>clang/doc/</tt>" directory in the Clang | 
 | 247 | tree.</p> | 
 | 248 |  | 
 | 249 | <p>If you have any questions or comments about Clang, please feel free to | 
 | 250 | contact us via the <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev"> | 
 | 251 | mailing list</a>.</p> | 
 | 252 |  | 
 | 253 | </body> | 
 | 254 | </html> |