1========================== 2Clang 11.0.0 Release Notes 3========================== 4 5.. contents:: 6 :local: 7 :depth: 2 8 9Written by the `LLVM Team <https://llvm.org/>`_ 10 11Introduction 12============ 13 14This document contains the release notes for the Clang C/C++/Objective-C 15frontend, part of the LLVM Compiler Infrastructure, release 11.0.0. Here we 16describe the status of Clang in some detail, including major 17improvements from the previous release and new feature work. For the 18general LLVM release notes, see `the LLVM 19documentation <https://llvm.org/docs/ReleaseNotes.html>`_. All LLVM 20releases may be downloaded from the `LLVM releases web 21site <https://llvm.org/releases/>`_. 22 23For more information about Clang or LLVM, including information about the 24latest release, please see the `Clang Web Site <https://clang.llvm.org>`_ or the 25`LLVM Web Site <https://llvm.org>`_. 26 27What's New in Clang 11.0.0? 28=========================== 29 30Some of the major new features and improvements to Clang are listed 31here. Generic improvements to Clang as a whole or to its underlying 32infrastructure are described first, followed by language-specific 33sections with improvements to Clang's support for those languages. 34 35 36Recovery AST 37------------ 38 39clang's AST now improves support for representing broken C++ code. This improves 40the quality of subsequent diagnostics after an error is encountered. It also 41exposes more information to tools like clang-tidy and clangd that consume 42clang’s AST, allowing them to be more accurate on broken code. 43 44A RecoveryExpr is introduced in clang's AST, marking an expression containing 45semantic errors. This preserves the source range and subexpressions of the 46broken expression in the AST (rather than discarding the whole expression). 47 48For the following invalid code: 49 50 .. code-block:: c++ 51 52 int NoArg(); // Line 1 53 int x = NoArg(42); // oops! 54 55clang-10 produces the minimal placeholder: 56 57 .. code-block:: c++ 58 59 // VarDecl <line:2:1, col:5> col:5 x 'int' 60 61clang-11 produces a richer AST: 62 63 .. code-block:: c++ 64 65 // VarDecl <line:2:1, col:16> col:5 x 'int' cinit 66 // `-RecoveryExpr <col:9, col:16> '<dependent type>' contains-errors lvalue 67 // `-UnresolvedLookupExpr <col:9> '<overloaded function>' lvalue (ADL) = 'NoArg' 68 // `-IntegerLiteral <col:15> 'int' 42 69 70Note that error-dependent types and values may now occur outside a template 71context. Tools may need to adjust assumptions about dependent code. 72 73This feature is on by default for C++ code, and can be explicitly controlled 74with `-Xclang -f[no-]recovery-ast`. 75 76Improvements to Clang's diagnostics 77----------------------------------- 78 79- -Wpointer-to-int-cast is a new warning group. This group warns about C-style 80 casts of pointers to a integer type too small to hold all possible values. 81 82- -Wuninitialized-const-reference is a new warning controlled by 83 -Wuninitialized. It warns on cases where uninitialized variables are passed 84 as const reference arguments to a function. 85 86- ``-Wimplicit-const-int-float-conversion`` (enabled by default) is a new 87 option controlled by ``-Wimplicit-int-float-conversion``. It warns on 88 implicit conversion from a floating constant to an integer type. 89 90Non-comprehensive list of changes in this release 91------------------------------------------------- 92 93- For the ARM target, C-language intrinsics are now provided for the full Arm 94 v8.1-M MVE instruction set. ``<arm_mve.h>`` supports the complete API defined 95 in the Arm C Language Extensions. 96 97- For the ARM target, C-language intrinsics ``<arm_cde.h>`` for the CDE 98 instruction set are now provided. 99 100- clang adds support for a set of extended integer types (``_ExtInt(N)``) that 101 permit non-power of 2 integers, exposing the LLVM integer types. Since a major 102 motivating use case for these types is to limit 'bit' usage, these types don't 103 automatically promote to 'int' when operations are done between two 104 ``ExtInt(N)`` types, instead math occurs at the size of the largest 105 ``ExtInt(N)`` type. 106 107- Users of UBSan, PGO, and coverage on Windows will now need to add clang's 108 library resource directory to their library search path. These features all 109 use runtime libraries, and Clang provides these libraries in its resource 110 directory. For example, if LLVM is installed in ``C:\Program Files\LLVM``, 111 then the profile runtime library will appear at 112 ``C:\Program Files\LLVM\lib\clang\11.0.0\lib\windows\clang_rt.profile-x86_64.lib``. 113 To ensure that the linker can find the appropriate library, users should pass 114 ``/LIBPATH:C:\Program Files\LLVM\lib\clang\11.0.0\lib\windows`` to the 115 linker. If the user links the program with the ``clang`` or ``clang-cl`` 116 drivers, the driver will pass this flag for them. 117 118- Clang's profile files generated through ``-fprofile-instr-generate`` are using 119 a fixed hashing algorithm that prevents some collision when loading 120 out-of-date profile informations. Clang can still read old profile files. 121 122- Clang adds support for the following macros that enable the 123 C-intrinsics from the `Arm C language extensions for SVE 124 <https://developer.arm.com/documentation/100987/>`_ (version 125 ``00bet5``, see section 2.1 for the list of intrinsics associated to 126 each macro): 127 128 129 ================================= ================= 130 Preprocessor macro Target feature 131 ================================= ================= 132 ``__ARM_FEATURE_SVE`` ``+sve`` 133 ``__ARM_FEATURE_SVE_BF16`` ``+sve+bf16`` 134 ``__ARM_FEATURE_SVE_MATMUL_FP32`` ``+sve+f32mm`` 135 ``__ARM_FEATURE_SVE_MATMUL_FP64`` ``+sve+f64mm`` 136 ``__ARM_FEATURE_SVE_MATMUL_INT8`` ``+sve+i8mm`` 137 ``__ARM_FEATURE_SVE2`` ``+sve2`` 138 ``__ARM_FEATURE_SVE2_AES`` ``+sve2-aes`` 139 ``__ARM_FEATURE_SVE2_BITPERM`` ``+sve2-bitperm`` 140 ``__ARM_FEATURE_SVE2_SHA3`` ``+sve2-sha3`` 141 ``__ARM_FEATURE_SVE2_SM4`` ``+sve2-sm4`` 142 ================================= ================= 143 144 The macros enable users to write C/C++ `Vector Length Agnostic 145 (VLA)` loops, that can be executed on any CPU that implements the 146 underlying instructions supported by the C intrinsics, independently 147 of the hardware vector register size. 148 149 For example, the ``__ARM_FEATURE_SVE`` macro is enabled when 150 targeting AArch64 code generation by setting ``-march=armv8-a+sve`` 151 on the command line. 152 153 .. code-block:: c 154 :caption: Example of VLA addition of two arrays with SVE ACLE. 155 156 // Compile with: 157 // `clang++ -march=armv8a+sve ...` (for c++) 158 // `clang -stc=c11 -march=armv8a+sve ...` (for c) 159 #include <arm_sve.h> 160 161 void VLA_add_arrays(double *x, double *y, double *out, unsigned N) { 162 for (unsigned i = 0; i < N; i += svcntd()) { 163 svbool_t Pg = svwhilelt_b64(i, N); 164 svfloat64_t vx = svld1(Pg, &x[i]); 165 svfloat64_t vy = svld1(Pg, &y[i]); 166 svfloat64_t vout = svadd_x(Pg, vx, vy); 167 svst1(Pg, &out[i], vout); 168 } 169 } 170 171 Please note that support for lazy binding of SVE function calls is 172 incomplete. When you interface user code with SVE functions that are 173 provided through shared libraries, avoid using lazy binding. If you 174 use lazy binding, the results could be corrupted. 175 176- ``-O`` maps to ``-O1`` instead of ``-O2``. 177 (`D79916 <https://reviews.llvm.org/D79916>`_) 178 179- In a ``-flto={full,thin}`` link, ``-Os``, ``-Oz`` and ``-Og`` can be used 180 now. ``-Os`` and ``-Oz`` map to the -O2 pipe line while ``-Og`` maps to the 181 -O1 pipeline. 182 (`D79919 <https://reviews.llvm.org/D79919>`_) 183 184- ``--coverage`` (gcov) defaults to gcov [4.8,8) compatible format now. 185 186- On x86, ``-fpic/-fPIC -fno-semantic-interposition`` assumes a global 187 definition of default visibility non-interposable and allows interprocedural 188 optimizations. In produced assembly ``-Lfunc$local`` local aliases are created 189 for global symbols of default visibility. 190 191New Compiler Flags 192------------------ 193 194- -fstack-clash-protection will provide a protection against the stack clash 195 attack for x86, s390x and ppc64 architectures through automatic probing of 196 each page of allocated stack. 197 198- -ffp-exception-behavior={ignore,maytrap,strict} allows the user to specify 199 the floating-point exception behavior. The default setting is ``ignore``. 200 201- -ffp-model={precise,strict,fast} provides the user an umbrella option to 202 simplify access to the many single purpose floating point options. The default 203 setting is ``precise``. 204 205- The default module cache has moved from /tmp to a per-user cache directory. 206 By default, this is ~/.cache but on some platforms or installations, this 207 might be elsewhere. The -fmodules-cache-path=... flag continues to work. 208 209- -fpch-instantiate-templates tries to instantiate templates already while 210 generating a precompiled header. Such templates do not need to be 211 instantiated every time the precompiled header is used, which saves compile 212 time. This may result in an error during the precompiled header generation 213 if the source header file is not self-contained. This option is enabled 214 by default for clang-cl. 215 216- -fpch-codegen and -fpch-debuginfo generate shared code and/or debuginfo 217 for contents of a precompiled header in a separate object file. This object 218 file needs to be linked in, but its contents do not need to be generated 219 for other objects using the precompiled header. This should usually save 220 compile time. If not using clang-cl, the separate object file needs to 221 be created explicitly from the precompiled header. 222 Example of use: 223 224 .. code-block:: console 225 226 $ clang++ -x c++-header header.h -o header.pch -fpch-codegen -fpch-debuginfo 227 $ clang++ -c header.pch -o shared.o 228 $ clang++ -c source.cpp -o source.o -include-pch header.pch 229 $ clang++ -o binary source.o shared.o 230 231 - Using -fpch-instantiate-templates when generating the precompiled header 232 usually increases the amount of code/debuginfo that can be shared. 233 - In some cases, especially when building with optimizations enabled, using 234 -fpch-codegen may generate so much code in the shared object that compiling 235 it may be a net loss in build time. 236 - Since headers may bring in private symbols of other libraries, it may be 237 sometimes necessary to discard unused symbols (such as by adding 238 -Wl,--gc-sections on ELF platforms to the linking command, and possibly 239 adding -fdata-sections -ffunction-sections to the command generating 240 the shared object). 241 242- ``-fsanitize-coverage-allowlist`` and ``-fsanitize-coverage-blocklist`` are added. 243 244- -mtls-size={12,24,32,48} allows selecting the size of the TLS (thread-local 245 storage) in the local exec TLS model of AArch64, which is the default TLS 246 model for non-PIC objects. Each value represents 4KB, 16MB (default), 4GB, 247 and 256TB (needs -mcmodel=large). This allows large/many thread local 248 variables or a compact/fast code in an executable. 249 250- -menable-experimental-extension` can be used to enable experimental or 251 unratified RISC-V extensions, allowing them to be targeted by specifying the 252 extension name and precise version number in the `-march` string. For these 253 experimental extensions, there is no expectation of ongoing support - the 254 compiler support will continue to change until the specification is 255 finalised. 256 257 258Modified Compiler Flags 259----------------------- 260 261- -fno-common has been enabled as the default for all targets. Therefore, C 262 code that uses tentative definitions as definitions of a variable in multiple 263 translation units will trigger multiple-definition linker errors. Generally, 264 this occurs when the use of the ``extern`` keyword is neglected in the 265 declaration of a variable in a header file. In some cases, no specific 266 translation unit provides a definition of the variable. The previous 267 behavior can be restored by specifying ``-fcommon``. 268- -Wasm-ignored-qualifier (ex. `asm const ("")`) has been removed and replaced 269 with an error (this matches a recent change in GCC-9). 270- -Wasm-file-asm-volatile (ex. `asm volatile ("")` at global scope) has been 271 removed and replaced with an error (this matches GCC's behavior). 272- Duplicate qualifiers on asm statements (ex. `asm volatile volatile ("")`) no 273 longer produces a warning via -Wduplicate-decl-specifier, but now an error 274 (this matches GCC's behavior). 275- The deprecated argument ``-f[no-]sanitize-recover`` has changed to mean 276 ``-f[no-]sanitize-recover=all`` instead of 277 ``-f[no-]sanitize-recover=undefined,integer`` and is no longer deprecated. 278- The argument to ``-f[no-]sanitize-trap=...`` is now optional and defaults to 279 ``all``. 280- ``-fno-char8_t`` now disables the ``char8_t`` keyword, not just the use of 281 ``char8_t`` as the character type of ``u8`` literals. This restores the 282 Clang 8 behavior that regressed in Clang 9 and 10. 283- -print-targets has been added to print the registered targets. 284- -mcpu is now supported for RISC-V, and recognises the generic-rv32, 285 rocket-rv32, sifive-e31, generic-rv64, rocket-rv64, and sifive-u54 target 286 CPUs. 287- ``-fwhole-program-vtables`` (along with ``-flto*``) now prepares all classes for possible whole program visibility if specified during the LTO link. 288 (`D71913 <https://reviews.llvm.org/D71913>`_) 289 290New Pragmas in Clang 291-------------------- 292 293- The ``clang max_tokens_here`` pragma can be used together with 294 `-Wmax-tokens <DiagnosticsReference.html#wmax-tokens>`_ to emit a warning when 295 the number of preprocessor tokens exceeds a limit. Such limits can be helpful 296 in limiting code growth and slow compiles due to large header files. 297 298Attribute Changes in Clang 299-------------------------- 300 301- Attributes can now be specified by clang plugins. See the 302 `Clang Plugins <ClangPlugins.html#defining-attributes>`_ documentation for 303 details. 304 305Windows Support 306--------------- 307 308- Don't warn about `ms_struct may not produce Microsoft-compatible layouts 309 for classes with base classes or virtual functions` if the option is 310 enabled globally, as opposed to enabled on a specific class/struct or 311 on a specific section in the source files. This avoids needing to 312 couple `-mms-bitfields` with `-Wno-incompatible-ms-struct` if building 313 C++ code. 314 315- Enable `-mms-bitfields` by default for MinGW targets, matching a similar 316 change in GCC 4.7. 317 318C Language Changes in Clang 319--------------------------- 320 321- The default C language standard used when `-std=` is not specified has been 322 upgraded from gnu11 to gnu17. 323 324- Clang now supports the GNU C extension `asm inline`; it won't do anything 325 *yet*, but it will be parsed. 326 327C++ Language Changes in Clang 328----------------------------- 329 330- Clang now implements a restriction on giving non-C-compatible anonymous 331 structs a typedef name for linkage purposes, as described in C++ committee 332 paper `P1766R1 <http://wg21.link/p1766r1>`. This paper was adopted by the 333 C++ committee as a Defect Report resolution, so it is applied retroactively 334 to all C++ standard versions. This affects code such as: 335 336 .. code-block:: c++ 337 338 typedef struct { 339 int f() { return 0; } 340 } S; 341 342 Previous versions of Clang rejected some constructs of this form 343 (specifically, where the linkage of the type happened to be computed 344 before the parser reached the typedef name); those cases are still rejected 345 in Clang 11. In addition, cases that previous versions of Clang did not 346 reject now produce an extension warning. This warning can be disabled with 347 the warning flag ``-Wno-non-c-typedef-for-linkage``. 348 349 Affected code should be updated to provide a tag name for the anonymous 350 struct: 351 352 .. code-block:: c++ 353 354 struct S { 355 int f() { return 0; } 356 }; 357 358 If the code is shared with a C compilation (for example, if the parts that 359 are not C-compatible are guarded with ``#ifdef __cplusplus``), the typedef 360 declaration should be retained, but a tag name should still be provided: 361 362 .. code-block:: c++ 363 364 typedef struct S { 365 int f() { return 0; } 366 } S; 367 368 369OpenCL Kernel Language Changes in Clang 370--------------------------------------- 371 372- Added extensions from `cl_khr_subgroup_extensions` to clang and the internal 373 header. 374 375- Added rocm device libs linking for AMDGPU. 376 377- Added diagnostic for OpenCL 2.0 blocks used in function arguments. 378 379- Fixed MS mangling for OpenCL 2.0 pipe type specifier. 380 381- Improved command line options for fast relaxed math. 382 383- Improved `atomic_fetch_min/max` functions in the internal header 384 (`opencl-c.h`). 385 386- Improved size of builtin function table for `TableGen`-based internal header 387 (enabled by `-fdeclare-opencl-builtins`) and added new functionality for 388 OpenCL 2.0 atomics, pipes, enqueue kernel, `cl_khr_subgroups`, 389 `cl_arm_integer_dot_product`. 390 391Changes related to C++ for OpenCL 392--------------------------------- 393 394- Added `addrspace_cast` operator. 395 396- Improved address space deduction in templates. 397 398- Improved diagnostics of address spaces in nested pointer conversions. 399 400ABI Changes in Clang 401-------------------- 402 403- For RISC-V, an ABI bug was fixed when passing complex single-precision 404 floats in RV64 with the hard float ABI. The bug could only be triggered for 405 function calls that exhaust the available FPRs. 406 407 408OpenMP Support in Clang 409----------------------- 410 411New features for OpenMP 5.0 were implemented. 412 413- OpenMP 5.0 is the default version supported by the compiler. User can switch 414 to OpenMP 4.5 using ``-fopenmp-version=45`` option. 415 416- Added support for declare variant directive. 417 418- Improved support of math functions and complex types for NVPTX target. 419 420- Added support for parallel execution of target regions for NVPTX target. 421 422- Added support for ``scan`` directives and ``inscan`` modifier in ``reduction`` 423 clauses. 424 425- Added support for ``iterator`` construct. 426 427- Added support for ``depobj`` construct. 428 429- Added support for ``detach`` clauses in task-based directives. 430 431- Added support for array shaping operations. 432 433- Added support for cancellation constructs in ``taskloop`` directives. 434 435- Nonmonotonic modifier is allowed with all schedule kinds. 436 437- Added support for ``task`` and ``default`` modifiers in ``reduction`` clauses. 438 439- Added support for strides in array sections. 440 441- Added support for ``use_device_addr`` clause. 442 443- Added support for ``uses_allocators`` clause. 444 445- Added support for ``defaultmap`` clause. 446 447- Added basic support for ``hint`` clause in ``atomic`` directives. 448 449- Added basic support for ``affinity`` clause. 450 451- Added basic support for ``ancestor`` modifier in ``device`` clause. 452 453- Added support for ``default(firstprivate)`` clause. This clause is the part of 454 upcoming OpenMP 5.1 and can be enabled using ``-fopenmp-version=51`` option. 455 456- Bug fixes and optimizations. 457 458 459Internal API Changes 460-------------------- 461 462These are major API changes that have happened since the 10.0.0 release of 463Clang. If upgrading an external codebase that uses Clang as a library, 464this section should help get you past the largest hurdles of upgrading. 465 466- ``RecursiveASTVisitor`` no longer calls separate methods to visit specific 467 operator kinds. Previously, ``RecursiveASTVisitor`` treated unary, binary, 468 and compound assignment operators as if they were subclasses of the 469 corresponding AST node. For example, the binary operator plus was treated as 470 if it was a ``BinAdd`` subclass of the ``BinaryOperator`` class: during AST 471 traversal of a ``BinaryOperator`` AST node that had a ``BO_Add`` opcode, 472 ``RecursiveASTVisitor`` was calling the ``TraverseBinAdd`` method instead of 473 ``TraverseBinaryOperator``. This feature was contributing a non-trivial 474 amount of complexity to the implementation of ``RecursiveASTVisitor``, it was 475 used only in a minor way in Clang, was not tested, and as a result it was 476 buggy. Furthermore, this feature was creating a non-uniformity in the API. 477 Since this feature was not documented, it was quite difficult to figure out 478 how to use ``RecursiveASTVisitor`` to visit operators. 479 480 To update your code to the new uniform API, move the code from separate 481 visitation methods into methods that correspond to the actual AST node and 482 perform case analysis based on the operator opcode as needed: 483 484 * ``TraverseUnary*() => TraverseUnaryOperator()`` 485 * ``WalkUpFromUnary*() => WalkUpFromUnaryOperator()`` 486 * ``VisitUnary*() => VisiUnaryOperator()`` 487 * ``TraverseBin*() => TraverseBinaryOperator()`` 488 * ``WalkUpFromBin*() => WalkUpFromBinaryOperator()`` 489 * ``VisitBin*() => VisiBinaryOperator()`` 490 * ``TraverseBin*Assign() => TraverseCompoundAssignOperator()`` 491 * ``WalkUpFromBin*Assign() => WalkUpFromCompoundAssignOperator()`` 492 * ``VisitBin*Assign() => VisiCompoundAssignOperator()`` 493 494Build System Changes 495-------------------- 496 497These are major changes to the build system that have happened since the 10.0.0 498release of Clang. Users of the build system should adjust accordingly. 499 500- clang-tidy and clang-include-fixer are no longer compiled into libclang by 501 default. You can set ``LIBCLANG_INCLUDE_CLANG_TOOLS_EXTRA=ON`` to undo that, 502 but it's expected that that setting will go away eventually. If this is 503 something you need, please reach out to the mailing list to discuss possible 504 ways forward. 505 506clang-format 507------------ 508 509- Option ``IndentExternBlock`` has been added to optionally apply indenting inside ``extern "C"`` and ``extern "C++"`` blocks. 510 511- ``IndentExternBlock`` option accepts ``AfterExternBlock`` to use the old behavior, as well as Indent and NoIndent options, which map to true and false, respectively. 512 513 .. code-block:: c++ 514 515 Indent: NoIndent: 516 #ifdef __cplusplus #ifdef __cplusplus 517 extern "C" { extern "C++" { 518 #endif #endif 519 520 void f(void); void f(void); 521 522 #ifdef __cplusplus #ifdef __cplusplus 523 } } 524 #endif #endif 525 526- Option ``IndentCaseBlocks`` has been added to support treating the block 527 following a switch case label as a scope block which gets indented itself. 528 It helps avoid having the closing bracket align with the switch statement's 529 closing bracket (when ``IndentCaseLabels`` is ``false``). 530 531 .. code-block:: c++ 532 533 switch (fool) { vs. switch (fool) { 534 case 1: case 1: { 535 { bar(); 536 bar(); } break; 537 } default: { 538 break; plop(); 539 default: } 540 { } 541 plop(); 542 } 543 } 544 545- Option ``ObjCBreakBeforeNestedBlockParam`` has been added to optionally apply 546 linebreaks for function arguments declarations before nested blocks. 547 548- Option ``InsertTrailingCommas`` can be set to ``TCS_Wrapped`` to insert 549 trailing commas in container literals (arrays and objects) that wrap across 550 multiple lines. It is currently only available for JavaScript and disabled by 551 default (``TCS_None``). 552 553- Option ``BraceWrapping.BeforeLambdaBody`` has been added to manage lambda 554 line break inside function parameter call in Allman style. 555 556 .. code-block:: c++ 557 558 true: 559 connect( 560 []() 561 { 562 foo(); 563 bar(); 564 }); 565 566 false: 567 connect([]() { 568 foo(); 569 bar(); 570 }); 571 572- Option ``AlignConsecutiveBitFields`` has been added to align bit field 573 declarations across multiple adjacent lines 574 575 .. code-block:: c++ 576 577 true: 578 bool aaa : 1; 579 bool a : 1; 580 bool bb : 1; 581 582 false: 583 bool aaa : 1; 584 bool a : 1; 585 bool bb : 1; 586 587- Option ``BraceWrapping.BeforeWhile`` has been added to allow wrapping 588 before the ```while`` in a do..while loop. By default the value is (``false``) 589 590 In previous releases ``IndentBraces`` implied ``BraceWrapping.BeforeWhile``. 591 If using a Custom BraceWrapping style you may need to now set 592 ``BraceWrapping.BeforeWhile`` to (``true``) to be explicit. 593 594 .. code-block:: c++ 595 596 true: 597 do { 598 foo(); 599 } 600 while(1); 601 602 false: 603 do { 604 foo(); 605 } while(1); 606 607 608.. _release-notes-clang-static-analyzer: 609 610Static Analyzer 611--------------- 612 613- Improved the analyzer's understanding of inherited C++ constructors. 614 615- Improved the analyzer's understanding of dynamic class method dispatching in 616 Objective-C. 617 618- Greatly improved the analyzer's constraint solver by better understanding 619 when constraints are imposed on multiple symbolic values that are known to be 620 equal or known to be non-equal. It will now also efficiently reject impossible 621 if-branches between known comparison expressions. 622 623- Added :ref:`on-demand parsing <ctu-on-demand>` capability to Cross Translation 624 Unit (CTU) analysis. 625 626- Numerous fixes and improvements for the HTML output. 627 628- New checker: :ref:`alpha.core.C11Lock <alpha-core-C11Lock>` and 629 :ref:`alpha.fuchsia.Lock <alpha-fuchsia-lock>` checks for their respective 630 locking APIs. 631 632- New checker: :ref:`alpha.security.cert.pos.34c <alpha-security-cert-pos-34c>` 633 finds calls to ``putenv`` where a pointer to an autmoatic variable is passed 634 as an argument. 635 636- New checker: :ref:`webkit.NoUncountedMemberChecker 637 <webkit-NoUncountedMemberChecker>` to enforce the existence of virtual 638 destructors for all uncounted types used as base classes. 639 640- New checker: :ref:`webkit.RefCntblBaseVirtualDtor 641 <webkit-RefCntblBaseVirtualDtor>` checks that only ref-counted types 642 are used as class members, not raw pointers and references to uncounted 643 types. 644 645- New checker: :ref:`alpha.cplusplus.SmartPtr <alpha-cplusplus-SmartPtr>` check 646 for dereference of null smart pointers. 647 648- Moved ``PlacementNewChecker`` out of alpha, making it enabled by default. 649 650- Added support for multi-dimensional variadic arrays in ``core.VLASize``. 651 652- Added a check for insufficient storage in array placement new calls, as well 653 as support for alignment variants to ``cplusplus.PlacementNew``. 654 655- While still in alpha, ``alpha.unix.PthreadLock``, the iterator and container 656 modeling infrastructure, ``alpha.unix.Stream``, and taint analysis were 657 improved greatly. An ongoing, currently off-by-default improvement was made on 658 the pre-condition modeling of several functions defined in the POSIX standard. 659 660- Improved the warning messages of several checkers. 661 662- Fixed a few remaining cases of checkers emitting reports under incorrect 663 checker names, and employed a few restrictions to more easily identify and 664 avoid such errors. 665 666- Moved several non-reporting checkers (those that model, among other things, 667 standard functions, but emit no diagnostics) to be listed under 668 ``-analyzer-checker-help-developer`` instead of ``-analyzer-checker-help``. 669 Manually enabling or disabling checkers found on this list is not supported 670 in production. 671 672- Numerous fixes for crashes, false positives and false negatives in 673 ``unix.Malloc``, ``osx.cocoa.NSError``, and several other checkers. 674 675- Implemented a dockerized testing system to more easily determine the 676 correctness and performance impact of a change to the static analyzer itself. 677 The currently beta-version tool is found in 678 ``(llvm-project repository)/clang/utils/analyzer/SATest.py``. 679 680.. _release-notes-ubsan: 681 682 683Additional Information 684====================== 685 686A wide variety of additional information is available on the `Clang web 687page <https://clang.llvm.org/>`_. The web page contains versions of the 688API documentation which are up-to-date with the Git version of 689the source code. You can access versions of these documents specific to 690this release by going into the "``clang/docs/``" directory in the Clang 691tree. 692 693If you have any questions or comments about Clang, please feel free to 694contact us via the `mailing 695list <https://lists.llvm.org/mailman/listinfo/cfe-dev>`_. 696