CLion 2020.2 EAP: CMake Updates, C++20 Enhancements, Unit Testing, and More
Last week the CLion 2020.2 EAP introduced the super-useful dangling pointer analysis. Have you had a chance to try it out yet? Meanwhile, we’ve been moving forward with CLion 2020.2!
A new CLion 2020.2 EAP build 202.6250.12 is now available for download. You can get it from our website, via the Toolbox App, or as a snap package (if you are using Ubuntu). A patch update is ready for anyone using the previous 2020.2 EAP build:
C++20 support improvements
We’ve updated the Clangd engine in CLion 2020.2, and fixed many crashes that happened in it on the C++20 code. It’s definitely now more stable for the latest available C++ standard. We are also continuing to add support for the C++20 features, and this build includes the following improvements:
- Code completion in designated initializers now works for fields from a base class:
explicit(bool)construct is now highlighted correctly, and the name hints for the condition arguments are shown:
This EAP also supports refactorings and navigation inside the
The CMake Profile settings under Build, Execution, Deployment | CMake has a newly polished UI, with a few useful tips added for the settings there:
CMake 3.17 brought the Ninja Multi-Config feature. We’ve recently implemented support for this new generator (
-G "Ninja Multi-Config") in CLion. However, there is a limitation that’s worth noting. Currently, multi-config generators in CLion create build files for every configuration, but only the one selected for the CMake profile is actually used by CLion. We are planning to add a UI to support multi-config generators, later (CPP-20890).
CLion 2020.2 now bundles CMake 3.17. However, there are still two important known issues that need to be resolved. There is the issue we mentioned above, and there is also an issue with the support for the CMake 3.16
PRECOMPILED_HEADERS target property (CPP-18582). We are now working hard to resolve both of these issues as soon as possible.
Unit testing with Google Test
CLion now supports skipping tests at runtime (for Google Test). Just use the
GTEST_SKIP() macro for this. Additionally, selecting and running multiple tests no longer results in a "Preparation canceled" message (CPP-20039).
Go to declaration / Find Usages
In CLion, the action Go to Declaration or Usages (Ctrl+Click / Ctrl+B on Linux/Windows, ⌘Click / ⌘B / force-touch on macOS) works differently for different cases:
- When invoked on a symbol usage, it navigates to that usage’s declaration.
- When invoked on a declaration, it shows the list of that declaration’s usages.
This behavior is compatible with the other IDEs on the IntelliJ Platform, including PyCharm, GoLand, IntelliJ IDEA, and others.
However, another Go to Declaration or Usages behavior is possible in CLion as well:
- When invoked on a definition, it shows the associated declaration.
Would you prefer to jump to the declaration from the definition or to get the list of usages like in other IntelliJ Platform IDEs? To control this behavior we’ve added a new option:
By default, Show usages popup is selected, which means usages are shown:
If you select Jump to predeclaration, then you’ll be taken to the declaration if it exists.
Note that, to go to the declaration, you can also use a left-gutter icon.
In addition to all this, a few frustrating bugs have also been fixed in this build:
- An extra closing brace was being added by mistake when pressing Enter after the opening brace and in presence of
- A regression was causing autocompletion not to appear for C structs (CPP-20555).
- A scope was breaking scope detection when opened in conditional code (CPP-12333).
This EAP also has an updated GDB STL pretty-printer bundled into it. Refer to the confluence page for the full list of fixes.
Your CLion team
The Drive to Develop
Subscribe to Blog updates
Thanks, we've got you!
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 2023.3 EAP6: Support for Intel Syntax in Assembly Views
Grab the fresh CLion 2023.3 EAP5 build (233.11555.2) from our website, via the Toolbox App, or as a snap package if you are using Ubuntu, or update via a patch if you’re using the previous EAP build. DOWNLOAD CLION EAP Intel syntax in the Assembly view Previously, CLion 2023.3 EAP added an Assembly…
CLion 2023.3 EAP5 With the Enhanced Bazel for CLion Plugin and Memory Leak Analysis
According to our Developer Ecosystem survey, 57% of C++ developers used CMake in 2022. However, there are other project models and build systems that are also popular in the C++ ecosystem. Just a couple of weeks ago, we added Meson support in CLion 2023.3. If you use Meson in your projects, conside…