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.
The highlights of the 2022.2 release:
- Enhanced Quick Documentation popup
- Better integration with CMake
- Debugger updates
- Embedded Development
- Code analysis improvements
- Enhanced toolchains: Docker, Remote, MSVC, CUDA
- Plugin updates
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.
constexpr calculations are typical use cases where this could be helpful:
It also shows the
enum value as an integer and whether a given struct or class declaration supports copy and move operations:
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:
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:
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:
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.
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.
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.
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.
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++
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:
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.
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
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.
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.
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!
Your CLion team
The Drive to Develop
Subscribe to Blog updates
Thanks, we've got you!
CLion 2023.3 Release Candidate
CLion 2023.3 is on its way, and the release candidate for v2023.3 is already available! To install CLion 2023.3 RC (build 233.11799.171), download it from the website, update via the Toolbox App, or use this snap package (for Ubuntu). You need an active subscription or a trial license to use CLi…
CLion Nova: A New Update With Various Bug Fixes
CLion Nova, a free preview of CLion with the ReSharper C++/Rider C++ language engine, was announced recently. We’re excited to see how well you liked the first build! There are about 3,700 users right now and the overall feedback is mostly positive, especially that which is related to performance an…
CLion 2023.3 Goes Beta
The Beta version of CLion Classic 2023.3 is now available with key improvements and changes that are expected in the upcoming release. Download build 233.11799.37 from our website, via the Toolbox App, or as a snap package for Ubuntu. If you are using CLion Nova, note that we do not plan to release…
CLion Nova Explodes onto the C and C++ Development Scene
TL;DR Today, we’re announcing a free early preview of CLion, which uses the ReSharper C++/Rider C++ language engine instead of the CLion "legacy" engine. The Preview build is available via our dedicated Toolbox App feed. At some point in 2024, depending on the results of the feedback coll…