News Releases

CLion 2022.2 Released

Today we’re announcing the CLion 2022.2 release! To update to the new version, you can use the Toolbox App or a snap package (on Ubuntu), download the installer from our website, or apply the patch update to upgrade from version 2022.1.

The CLion 2022.2 release improves CMake integration. The Quick Documentation popup has become a useful source of knowledge about your C++ and CMake code. Enhanced static and dynamic code analysis, better debugger integration, and performance improvements for remote and Docker toolchains help you develop more productively. Read on for more details and give CLion 2022.2 a try.

CLion 2022.2 Released

The highlights of the 2022.2 release:

DOWNLOAD CLION 2022.2

Reading through the codebase with the enhanced Quick Documentation

Developers typically spend a lot more time reading code than they do writing it. Tools that help you read code more easily and grasp the ideas behind the code more effectively are real productivity boosters. The Quick Documentation popup (available on mouseover by default, Ctrl+Q on Windows/Linux, F1 on macOS) is one such tool! It’s a universal instrument to help you get more information on a code element at the caret. In v2022.2, CLion has added more code insight to this documentation.

CLion now allows you to view the value of the expressions evaluated at compile time in the Quick Documentation popup. Consteval and constexpr calculations are typical use cases where this could be helpful:
Quick Doc shows constexpr calculations

It also shows the enum value as an integer and whether a given struct or class declaration supports copy and move operations:
Copy-move in Quick Doc

The Quick Documentation popup now assists you with documentation for the standard CMake commands and variables – consult it in CMake scripts. Using the pre-generated HTML files with documentation for the bundled CMake version, CLion shows information about commands, policies, modules, variables, and properties:
Quick Doc in CMake

What other pieces of information would you like to see in the Quick Documentation popup? Let us know in the comments.

Better integration with CMake

CMake is a leading project model in the C++ ecosystem. It also evolves quickly, bringing useful features like CMake presets to users. CMake presets are a way to configure and share CMake options. In CLion, settings required for building a CMake project are incorporated into CMake profiles, which have many settings in common with CMake presets and are also shareable via VCS. CLion automatically generates CMake profiles based on the CMake presets found in the project.

In this release, we changed the naming scheme used in automatic generation. When auto-creating CLion profiles for all the configure and build presets, CLion now uses the following naming scheme:

  • Configure presets are imported with the name configure-preset-name.
  • Build presets are imported as a configure-preset-name – build-preset-name combination.

A copy action for profiles created from presets is enabled, so you can copy and edit the copy later.

CLion 2022.2 comes with CMake 3.23 bundled. If you use CMake 3.24, you’ll find the fix that we added for the Ninja colorized output. For GCC and Clang, we implemented a way to enable colorized output for the Ninja generator in CMake and turn it on by default in CLion:
Colorized Ninja

We’re continually adding more assistance for CMake editing. In addition to the Quick Documentation popup now available for CMake scripts, CLion 2022.2 enhances the code completion in CMake. For that, Qt-related commands were added to completion lists:
Qt CMake completion

In CLion 2022.2, you can now review CMake cache variables and update CMake options that are passed to the CMake command in a single table-based UI in Settings/Preferences | Build, Execution, Deployment | CMake.
CMake Cache in CLion

In the table, you can search for a variable or its value, visually distinguish recently edited values and values defined in your CLion’s CMake options, and check out the short description in tooltips for CMake cache variables.

Debugger updates

CLion v2022.2 bundles GDB v12.1 and LLDB v14.

Windows users can also now benefit from symbol server support in CLion. If the library symbols are not available on your local machine, you can configure a symbol server, a file server that stores your debug symbols centrally on a server, in CLion and use it during the debug. Learn more.

Embedded Development

GDB servers are often used to debug on-chip. In CLion, you can do that via the Embedded GDB Server run configurations. It supports many known GDB servers, like Segger JLink, QEMU, PE Micro, St-util, and others. However, it can be challenging to fill in all of the GDB server arguments correctly.

A new wizard helps with creating Embedded GDB Server run configurations with the predefined GDB server arguments corresponding to the GDB server type selected in the wizard settings. Launch the new wizard via Run | New Embedded Configuration. Learn more.
Embedded GDB Server wizard

Code analysis improvements

We’re continuing to make code analysis in CLion more accurate. Along with fixing many issues and removing incorrect warnings, we also implemented Interval analysis. This analysis is a part of data flow analysis and it calculates the upper and lower bounds of the possible values for every integral variable. This knowledge allows CLion to catch various potential issues in the code. The most notable situation is Array index is out of bounds. It reports variables that access an array or allocated buffer via the index, which may be out of bounds. It also helps with C-string and C++ std::string:
Interval Analysis
Learn more.

Clang-Tidy has been integrated into CLion for a long time. In this release, we made the integration even more convenient. For example, if you’d like to know which exact Clang-Tidy configuration CLion is using to analyze the current file, you can open and edit it via a new Clang-Tidy widget. If there is no file with these settings, the widget will help you create one:
Clang-Tidy widget

If you are more interested in dynamic analysis, which happens when the program is launched, there are a few enhancements to the Valgrind Memcheck integration into CLion.

In CLion 2022.2, we’ve enhanced the way configuration issues are reported. CLion now notifies you when Valgrind Memcheck is launched for the release configuration and the debug information is missing for the executable as a result. Previously, CLion failed silently in cases like this.
Valgrind notifications

We also removed incorrect errors shown when Valgrind is launched in remote mode.

Enhanced toolchains: Docker, Remote, MSVC, CUDA

CLion 2022.2 brings performance enhancements and other fixes to various supported toolchains:

  • It enables system header indexing for the Microsoft Visual C++ toolchain. This makes auto-import work for these headers.
  • When using remote development with local sources, CLion 2022.2 relies on rsync to synchronize your deployment configuration, thus improving the performance of the initial synchronization step. On Linux and macOS, it’s enabled by default, while on Windows, it requires additional configuration for the rsync path in Tools | Rsync. Learn more here.
  • Docker toolchain also got a performance boost. We sped up compiler information collection by using Docker exec instead of run. Also, the environment file located inside the Docker image is now correctly picked by CLion.
  • If you develop with CUDA, you can find a few useful enhancements. CUDA compilation database projects are now supported in CLion, and the CUDA-gdb debugger integration was fixed to allow you to step out from CUDA calls correctly.

Plugin updates

JetBrains Space is a complete software development platform that provides project management, issue tracking, Git hosting, code reviews, continuous integration, package repositories, and remote backend orchestration for JetBrains IDEs through dev environments.

Integration with Space is now bundled into CLion 2022.2 and allows you to browse Space projects and clone repositories, then start working on them directly:
Space repositories

When your changes are ready, you can create a merge request and perform a code review from within the IDE:
Review in Space

The IntelliJ Rust plugin also has a lot of useful enhancements in the new version. Learn more in the Rust blog.

That’s it for now! We encourage you to give CLion 2022.2 a try. If you have an active subscription, you can update today. Otherwise, we invite you to start your free 30-day trial to check out the new features and see what you think!

DOWNLOAD CLION 2022.2

Your CLion team
JetBrains
The Drive to Develop

image description

Discover more