After six months of development, the release of the project llvm 21.1.0 has been announced. This project focuses on developing tools for the toolkit such as compilers, optimizers, and code generators, which compile programs into intermediate bit RISC-like virtual instructions using a multi-level optimization system. The generated pseudo-code can be converted into machine code for a specific platform or used by a JIT compiler to form machine instructions directly during program execution. The Clang compiler, based on LLVM technology, supports programming languages like C, C++, and Objective-C. With the release of the 21.1.0 version, a new version numbering scheme has been adopted where the first stable version is now assigned the number “N.1”.
Among the improvements in Clang 21 are:
- Capabilities related to C++:
- Expressions in assembler inserts can now be determined by directive:
int foo::string_view
- New extended versions of “new” and “delete” expressions have been added, supporting the argument “STD::type_identity” to provide information about the type of object for memory allocation or deallocation.
- Added the ability to calculate lambda-functions that involve structured bindings at compilation stage within the context of a constant expression.
- Expressions in assembler inserts can now be determined by directive:
- Capabilities associated with the future C++ 2S (C++ 26) standard:
- Structured packs now support the syntax “…” to specify packages, extracting the remaining elements from the assigned sequence.
- Support for “trivial moves” types has been added, enabling the optimization of object movements by cloning them in memory without invoking constructors or destructors.