Sean Silva | 28c1f75 | 2013-01-02 22:05:33 +0000 | [diff] [blame] | 1 | ===================================== |
| 2 | Clang 3.3 (In-Progress) Release Notes |
| 3 | ===================================== |
Sean Silva | debc018 | 2012-12-23 01:19:35 +0000 | [diff] [blame] | 4 | |
| 5 | .. contents:: |
| 6 | :local: |
| 7 | :depth: 2 |
| 8 | |
| 9 | Written by the `LLVM Team <http://llvm.org/>`_ |
| 10 | |
| 11 | .. warning:: |
| 12 | |
| 13 | These are in-progress notes for the upcoming Clang 3.3 release. You may |
| 14 | prefer the `Clang 3.2 Release Notes |
| 15 | <http://llvm.org/releases/3.2/docs/ClangReleaseNotes.html>`_. |
| 16 | |
| 17 | Introduction |
| 18 | ============ |
| 19 | |
| 20 | This document contains the release notes for the Clang C/C++/Objective-C |
| 21 | frontend, part of the LLVM Compiler Infrastructure, release 3.3. Here we |
| 22 | describe the status of Clang in some detail, including major |
| 23 | improvements from the previous release and new feature work. For the |
| 24 | general LLVM release notes, see `the LLVM |
| 25 | documentation <http://llvm.org/docs/ReleaseNotes.html>`_. All LLVM |
| 26 | releases may be downloaded from the `LLVM releases web |
| 27 | site <http://llvm.org/releases/>`_. |
| 28 | |
| 29 | For more information about Clang or LLVM, including information about |
| 30 | the latest release, please check out the main please see the `Clang Web |
| 31 | Site <http://clang.llvm.org>`_ or the `LLVM Web |
| 32 | Site <http://llvm.org>`_. |
| 33 | |
| 34 | Note that if you are reading this file from a Subversion checkout or the |
| 35 | main Clang web page, this document applies to the *next* release, not |
| 36 | the current one. To see the release notes for a specific release, please |
| 37 | see the `releases page <http://llvm.org/releases/>`_. |
| 38 | |
| 39 | What's New in Clang 3.3? |
| 40 | ======================== |
| 41 | |
| 42 | Some of the major new features and improvements to Clang are listed |
| 43 | here. Generic improvements to Clang as a whole or to its underlying |
| 44 | infrastructure are described first, followed by language-specific |
| 45 | sections with improvements to Clang's support for those languages. |
| 46 | |
| 47 | Major New Features |
| 48 | ------------------ |
| 49 | |
| 50 | Improvements to Clang's diagnostics |
| 51 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 52 | |
| 53 | Clang's diagnostics are constantly being improved to catch more issues, |
| 54 | explain them more clearly, and provide more accurate source information |
| 55 | about them. The improvements since the 3.2 release include: |
| 56 | |
| 57 | - ... |
| 58 | |
Jordan Rose | 992c592 | 2013-02-09 02:12:23 +0000 | [diff] [blame] | 59 | Extended Identifiers: Unicode Support and Universal Character Names |
| 60 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 61 | |
| 62 | Clang 3.3 includes support for *extended identifiers* in C99 and C++. |
| 63 | This feature allows identifiers to contain certain Unicode characters, as |
| 64 | specified by the active language standard; these characters can be written |
| 65 | directly in the source file using the UTF-8 encoding, or referred to using |
| 66 | *universal character names* (``\u00E0``, ``\U000000E0``). |
| 67 | |
Sean Silva | debc018 | 2012-12-23 01:19:35 +0000 | [diff] [blame] | 68 | New Compiler Flags |
| 69 | ------------------ |
| 70 | |
| 71 | - ... |
| 72 | |
| 73 | C Language Changes in Clang |
| 74 | --------------------------- |
| 75 | |
| 76 | C11 Feature Support |
| 77 | ^^^^^^^^^^^^^^^^^^^ |
| 78 | |
| 79 | ... |
| 80 | |
| 81 | C++ Language Changes in Clang |
| 82 | ----------------------------- |
| 83 | |
Rafael Espindola | 40db515 | 2013-04-09 12:51:24 +0000 | [diff] [blame] | 84 | - Clang now correctly implements language linkage for functions and variables. |
| 85 | This means that, for example, it is now possible to overload static functions |
| 86 | declared in an ``extern "C"`` context. For backwards compatibility, an alias |
| 87 | with the unmangled name is still emitted if it is the only one and has the |
| 88 | ``used`` attribute. |
| 89 | |
Sean Silva | debc018 | 2012-12-23 01:19:35 +0000 | [diff] [blame] | 90 | C++11 Feature Support |
| 91 | ^^^^^^^^^^^^^^^^^^^^^ |
| 92 | |
| 93 | ... |
| 94 | |
| 95 | Objective-C Language Changes in Clang |
| 96 | ------------------------------------- |
| 97 | |
| 98 | ... |
| 99 | |
| 100 | Internal API Changes |
| 101 | -------------------- |
| 102 | |
| 103 | These are major API changes that have happened since the 3.2 release of |
| 104 | Clang. If upgrading an external codebase that uses Clang as a library, |
| 105 | this section should help get you past the largest hurdles of upgrading. |
| 106 | |
David Blaikie | a62e561 | 2013-02-23 19:27:10 +0000 | [diff] [blame] | 107 | Value Casting |
| 108 | ^^^^^^^^^^^^^ |
| 109 | |
| 110 | Certain type hierarchies (TypeLoc, CFGElement, ProgramPoint, and SVal) were |
| 111 | misusing the llvm::cast machinery to perform undefined operations. Their APIs |
| 112 | have been changed to use two member function templates that return values |
| 113 | instead of pointers or references - "T castAs" and "Optional<T> getAs" (in the |
| 114 | case of the TypeLoc hierarchy the latter is "T getAs" and you can use the |
| 115 | boolean testability of a TypeLoc (or its 'validity') to verify that the cast |
| 116 | succeeded). Essentially all previous 'cast' usage should be replaced with |
David Blaikie | 04ea68c | 2013-02-23 19:30:31 +0000 | [diff] [blame] | 117 | 'castAs' and 'dyn_cast' should be replaced with 'getAs'. See r175462 for the |
| 118 | first example of such a change along with many examples of how code was |
| 119 | migrated to the new API. |
Rafael Espindola | d2615cc | 2013-04-03 19:27:57 +0000 | [diff] [blame] | 120 | |
| 121 | Storage Class |
| 122 | ^^^^^^^^^^^^^ |
| 123 | |
| 124 | For each variable and function Clang used to keep the storage class as written |
| 125 | in the source, the linkage and a semantic storage class. This was a bit |
| 126 | redundant and the semantic storage class has been removed. The method |
| 127 | getStorageClass now returns what is written it the source code for that decl. |
Sean Silva | debc018 | 2012-12-23 01:19:35 +0000 | [diff] [blame] | 128 | |
| 129 | ... |
| 130 | |
Ted Kremenek | 230fc37 | 2013-04-24 07:33:52 +0000 | [diff] [blame] | 131 | libclang |
| 132 | -------- |
| 133 | |
| 134 | The clang_CXCursorSet_contains() function previously incorrectly returned 0 |
| 135 | if it contained a CXCursor, contrary to what the documentation stated. This |
| 136 | has been fixed so that the function returns a non-zero value if the set |
| 137 | contains a cursor. This is API breaking change, but matches the intended |
| 138 | original behavior. Moreover, this also fixes the issue of an invalid CXCursorSet |
| 139 | appearing to contain any CXCursor. |
| 140 | |
Anna Zaks | 08741a0 | 2013-04-25 23:14:38 +0000 | [diff] [blame^] | 141 | Static Analyzer |
| 142 | -------- |
| 143 | We've continued the work on improving the core analysis and added several new memory management checks: |
| 144 | |
| 145 | - Support for reasoning about constructors and destructors |
| 146 | - New false positive suppression mechanisms that reduced the number of null pointer dereference warnings |
| 147 | - Major performance enhancements to speed up interprocedural analysis |
| 148 | - New memory error checks such as use-after-free with C++ 'delete', mismatched allocators and deallocators |
| 149 | - Additional checks for misuse of Apple Foundation framework collection APIs |
| 150 | |
Sean Silva | debc018 | 2012-12-23 01:19:35 +0000 | [diff] [blame] | 151 | Python Binding Changes |
| 152 | ---------------------- |
| 153 | |
| 154 | The following methods have been added: |
| 155 | |
| 156 | - ... |
| 157 | |
| 158 | Significant Known Problems |
| 159 | ========================== |
| 160 | |
| 161 | Additional Information |
| 162 | ====================== |
| 163 | |
| 164 | A wide variety of additional information is available on the `Clang web |
| 165 | page <http://clang.llvm.org/>`_. The web page contains versions of the |
| 166 | API documentation which are up-to-date with the Subversion version of |
| 167 | the source code. You can access versions of these documents specific to |
| 168 | this release by going into the "``clang/docs/``" directory in the Clang |
| 169 | tree. |
| 170 | |
| 171 | If you have any questions or comments about Clang, please feel free to |
| 172 | contact us via the `mailing |
| 173 | list <http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev>`_. |