Sean Silva | b045514 | 2013-01-02 22:05:33 +0000 | [diff] [blame] | 1 | ===================================== |
Bill Wendling | 0a794a4b | 2013-11-20 10:13:37 +0000 | [diff] [blame] | 2 | Clang 3.5 (In-Progress) Release Notes |
Sean Silva | b045514 | 2013-01-02 22:05:33 +0000 | [diff] [blame] | 3 | ===================================== |
Sean Silva | fe25144 | 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 | |
Bill Wendling | 0a794a4b | 2013-11-20 10:13:37 +0000 | [diff] [blame] | 13 | These are in-progress notes for the upcoming Clang 3.5 release. You may |
| 14 | prefer the `Clang 3.4 Release Notes |
| 15 | <http://llvm.org/releases/3.4/tools/clang/docs/ReleaseNotes.html>`_. |
Sean Silva | fe25144 | 2012-12-23 01:19:35 +0000 | [diff] [blame] | 16 | |
| 17 | Introduction |
| 18 | ============ |
| 19 | |
| 20 | This document contains the release notes for the Clang C/C++/Objective-C |
Bill Wendling | 0a794a4b | 2013-11-20 10:13:37 +0000 | [diff] [blame] | 21 | frontend, part of the LLVM Compiler Infrastructure, release 3.5. Here we |
Sean Silva | fe25144 | 2012-12-23 01:19:35 +0000 | [diff] [blame] | 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 | |
Bill Wendling | 0a794a4b | 2013-11-20 10:13:37 +0000 | [diff] [blame] | 39 | What's New in Clang 3.5? |
Sean Silva | fe25144 | 2012-12-23 01:19:35 +0000 | [diff] [blame] | 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 | |
Rafael Espindola | 3497069 | 2013-12-12 16:07:11 +0000 | [diff] [blame] | 50 | - Clang uses the new MingW ABI |
Aaron Ballman | 5afdd1d | 2014-02-23 16:27:21 +0000 | [diff] [blame] | 51 | GCC 4.7 changed the mingw ABI. Clang 3.4 and older use the GCC 4.6 |
| 52 | ABI. Clang 3.5 and newer use the GCC 4.7 abi. |
Rafael Espindola | 3497069 | 2013-12-12 16:07:11 +0000 | [diff] [blame] | 53 | |
Sylvestre Ledru | 06aebc4 | 2014-06-14 09:28:27 +0000 | [diff] [blame] | 54 | - The __has_attribute feature test is now target-aware. Older versions of Clang |
| 55 | would return true when the attribute spelling was known, regardless of whether |
| 56 | the attribute was available to the specific target. Clang now returns true |
| 57 | only when the attribute pertains to the current compilation target. |
Aaron Ballman | a4bb4b9 | 2014-01-09 23:11:13 +0000 | [diff] [blame] | 58 | |
Rafael Espindola | 3497069 | 2013-12-12 16:07:11 +0000 | [diff] [blame] | 59 | |
Sean Silva | fe25144 | 2012-12-23 01:19:35 +0000 | [diff] [blame] | 60 | Improvements to Clang's diagnostics |
| 61 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 62 | |
| 63 | Clang's diagnostics are constantly being improved to catch more issues, |
| 64 | explain them more clearly, and provide more accurate source information |
Bill Wendling | 0a794a4b | 2013-11-20 10:13:37 +0000 | [diff] [blame] | 65 | about them. The improvements since the 3.4 release include: |
Sean Silva | fe25144 | 2012-12-23 01:19:35 +0000 | [diff] [blame] | 66 | |
Sylvestre Ledru | 5e43f74 | 2014-07-14 18:30:23 +0000 | [diff] [blame] | 67 | - GCC compatibility: Clang displays a warning on unsupported gcc |
| 68 | optimization flags instead of an error. |
| 69 | |
Sean Silva | fe25144 | 2012-12-23 01:19:35 +0000 | [diff] [blame] | 70 | - ... |
| 71 | |
Sean Silva | fe25144 | 2012-12-23 01:19:35 +0000 | [diff] [blame] | 72 | New Compiler Flags |
| 73 | ------------------ |
| 74 | |
Renato Golin | 1588cda | 2013-12-11 09:35:10 +0000 | [diff] [blame] | 75 | The integrated assembler is now turned on by default on ARM (and Thumb), |
Saleem Abdulrasool | 3aa840e | 2014-02-23 02:08:45 +0000 | [diff] [blame] | 76 | so the use of the option `-fintegrated-as` is now redundant on those |
Renato Golin | 1588cda | 2013-12-11 09:35:10 +0000 | [diff] [blame] | 77 | architectures. This is an important move to both *eat our own dog food* |
| 78 | and to ease cross-compilation tremendously. |
| 79 | |
| 80 | We are aware of the problems that this may cause for code bases that |
| 81 | rely on specific GNU syntax or extensions, and we're working towards |
| 82 | getting them all fixed. Please, report bugs or feature requests if |
Saleem Abdulrasool | 3aa840e | 2014-02-23 02:08:45 +0000 | [diff] [blame] | 83 | you find anything. In the meantime, use `-fno-integrated-as` to revert |
Renato Golin | 1588cda | 2013-12-11 09:35:10 +0000 | [diff] [blame] | 84 | back the call to GNU assembler. |
Michael Gottesman | 930ecdb | 2013-06-20 23:28:10 +0000 | [diff] [blame] | 85 | |
Saleem Abdulrasool | 3aa840e | 2014-02-23 02:08:45 +0000 | [diff] [blame] | 86 | In order to provide better diagnostics, the integrated assembler validates |
| 87 | inline assembly when the integrated assembler is enabled. Because this is |
| 88 | considered a feature of the compiler, it is controlled via the `fintegrated-as` |
| 89 | and `fno-integrated-as` flags which enable and disable the integrated assembler |
| 90 | respectively. `-integrated-as` and `-no-integrated-as` are now considered |
| 91 | legacy flags (but are available as an alias to prevent breaking existing users), |
| 92 | and users are encouraged to switch to the equivalent new feature flag. |
| 93 | |
Alexey Samsonov | 997a923 | 2014-03-21 07:25:01 +0000 | [diff] [blame] | 94 | Deprecated flags `-faddress-sanitizer`, `-fthread-sanitizer`, |
| 95 | `-fcatch-undefined-behavior` and `-fbounds-checking` were removed in favor of |
| 96 | `-fsanitize=` family of flags. |
| 97 | |
Diego Novillo | 263ce21 | 2014-05-29 20:13:27 +0000 | [diff] [blame] | 98 | It is now possible to get optimization reports from the major transformation |
| 99 | passes via three new flags: `-Rpass`, `-Rpass-missed` and `-Rpass-analysis`. |
| 100 | These flags take a POSIX regular expression which indicates the name |
| 101 | of the pass (or passes) that should emit optimization remarks. |
| 102 | |
Sylvestre Ledru | 0e767b1 | 2014-07-14 18:34:37 +0000 | [diff] [blame] | 103 | The option `-u` is forwarded to the linker on gnutools toolchains. |
| 104 | |
Tyler Nowicki | db2668a | 2014-06-18 00:51:32 +0000 | [diff] [blame] | 105 | New Pragmas in Clang |
| 106 | ----------------------- |
| 107 | |
| 108 | Loop optimization hints can be specified using the new `#pragma clang loop` |
Eli Bendersky | 778268d | 2014-06-19 18:12:44 +0000 | [diff] [blame] | 109 | directive just prior to the desired loop. The directive allows vectorization, |
| 110 | interleaving, and unrolling to be enabled or disabled. Vector width as well |
| 111 | as interleave and unrolling count can be manually specified. See language |
| 112 | extensions for details. |
Tyler Nowicki | db2668a | 2014-06-18 00:51:32 +0000 | [diff] [blame] | 113 | |
Mark Heffernan | bd26f5e | 2014-07-21 18:08:34 +0000 | [diff] [blame^] | 114 | Clang now supports the `#pragma unroll` directive to specify loop unrolling |
| 115 | optimization hints. Placed just prior to the desired loop, `#pragma unroll` |
| 116 | directs the loop unroller to attempt to fully unroll the loop. The pragma may |
| 117 | also be specified with a positive integer parameter indicating the desired |
| 118 | unroll count: `#pragma unroll _value_`. The unroll count parameter can be |
| 119 | optionally enclosed in parentheses. |
| 120 | |
Renato Golin | f2fcddb | 2013-12-13 09:27:34 +0000 | [diff] [blame] | 121 | C Language Changes in Clang |
| 122 | --------------------------- |
| 123 | |
| 124 | ... |
| 125 | |
Sean Silva | fe25144 | 2012-12-23 01:19:35 +0000 | [diff] [blame] | 126 | C11 Feature Support |
| 127 | ^^^^^^^^^^^^^^^^^^^ |
| 128 | |
| 129 | ... |
| 130 | |
| 131 | C++ Language Changes in Clang |
| 132 | ----------------------------- |
| 133 | |
Bill Wendling | 61f44cc | 2013-06-04 06:17:46 +0000 | [diff] [blame] | 134 | - ... |
Rafael Espindola | 9ca6e81 | 2013-04-09 12:51:24 +0000 | [diff] [blame] | 135 | |
Sean Silva | fe25144 | 2012-12-23 01:19:35 +0000 | [diff] [blame] | 136 | C++11 Feature Support |
| 137 | ^^^^^^^^^^^^^^^^^^^^^ |
| 138 | |
| 139 | ... |
| 140 | |
| 141 | Objective-C Language Changes in Clang |
| 142 | ------------------------------------- |
| 143 | |
| 144 | ... |
| 145 | |
Erik Schnetter | 489700d | 2013-11-11 06:36:33 +0000 | [diff] [blame] | 146 | OpenCL C Language Changes in Clang |
| 147 | ---------------------------------- |
| 148 | |
Bill Wendling | 0a794a4b | 2013-11-20 10:13:37 +0000 | [diff] [blame] | 149 | ... |
Erik Schnetter | 489700d | 2013-11-11 06:36:33 +0000 | [diff] [blame] | 150 | |
Sean Silva | fe25144 | 2012-12-23 01:19:35 +0000 | [diff] [blame] | 151 | Internal API Changes |
| 152 | -------------------- |
| 153 | |
Bill Wendling | 0a794a4b | 2013-11-20 10:13:37 +0000 | [diff] [blame] | 154 | These are major API changes that have happened since the 3.4 release of |
Sean Silva | fe25144 | 2012-12-23 01:19:35 +0000 | [diff] [blame] | 155 | Clang. If upgrading an external codebase that uses Clang as a library, |
| 156 | this section should help get you past the largest hurdles of upgrading. |
| 157 | |
Sean Silva | fe25144 | 2012-12-23 01:19:35 +0000 | [diff] [blame] | 158 | ... |
| 159 | |
Ted Kremenek | 3a2291b | 2013-04-24 07:33:52 +0000 | [diff] [blame] | 160 | libclang |
| 161 | -------- |
| 162 | |
Bill Wendling | 61f44cc | 2013-06-04 06:17:46 +0000 | [diff] [blame] | 163 | ... |
Ted Kremenek | 3a2291b | 2013-04-24 07:33:52 +0000 | [diff] [blame] | 164 | |
Anna Zaks | b6219a9 | 2013-04-25 23:14:38 +0000 | [diff] [blame] | 165 | Static Analyzer |
Ted Kremenek | 004e823 | 2013-04-26 00:01:34 +0000 | [diff] [blame] | 166 | --------------- |
Anna Zaks | b6219a9 | 2013-04-25 23:14:38 +0000 | [diff] [blame] | 167 | |
Sylvestre Ledru | 06aebc4 | 2014-06-14 09:28:27 +0000 | [diff] [blame] | 168 | The `-analyzer-config` options are now passed from scan-build through to |
| 169 | ccc-analyzer and then to Clang. |
| 170 | |
| 171 | With the option `-analyzer-config stable-report-filename=true`, |
| 172 | instead of `report-XXXXXX.html`, scan-build/clang analyzer generate |
| 173 | `report-<filename>-<function, method name>-<function position>-<id>.html`. |
| 174 | (id = i++ for several issues found in the same function/method). |
| 175 | |
| 176 | List the function/method name in the index page of scan-build. |
| 177 | |
Bill Wendling | 0a794a4b | 2013-11-20 10:13:37 +0000 | [diff] [blame] | 178 | ... |
Ted Kremenek | 004e823 | 2013-04-26 00:01:34 +0000 | [diff] [blame] | 179 | |
| 180 | Core Analysis Improvements |
| 181 | ========================== |
| 182 | |
Bill Wendling | 61f44cc | 2013-06-04 06:17:46 +0000 | [diff] [blame] | 183 | - ... |
Ted Kremenek | 004e823 | 2013-04-26 00:01:34 +0000 | [diff] [blame] | 184 | |
| 185 | New Issues Found |
| 186 | ================ |
| 187 | |
Bill Wendling | 61f44cc | 2013-06-04 06:17:46 +0000 | [diff] [blame] | 188 | - ... |
Anna Zaks | b6219a9 | 2013-04-25 23:14:38 +0000 | [diff] [blame] | 189 | |
Sean Silva | fe25144 | 2012-12-23 01:19:35 +0000 | [diff] [blame] | 190 | Python Binding Changes |
| 191 | ---------------------- |
| 192 | |
| 193 | The following methods have been added: |
| 194 | |
| 195 | - ... |
| 196 | |
| 197 | Significant Known Problems |
| 198 | ========================== |
| 199 | |
| 200 | Additional Information |
| 201 | ====================== |
| 202 | |
| 203 | A wide variety of additional information is available on the `Clang web |
| 204 | page <http://clang.llvm.org/>`_. The web page contains versions of the |
| 205 | API documentation which are up-to-date with the Subversion version of |
| 206 | the source code. You can access versions of these documents specific to |
| 207 | this release by going into the "``clang/docs/``" directory in the Clang |
| 208 | tree. |
| 209 | |
| 210 | If you have any questions or comments about Clang, please feel free to |
| 211 | contact us via the `mailing |
| 212 | list <http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev>`_. |