CLion 2020.3 EAP: More Advanced Google Test Integration, Qt-Specific Code Completion, Recompile Single File for Makefiles, and More
Earlier in September, we began the 2020.3 Early Access Program for CLion which introduces the following enhancements:
- CTest support
- An action to set execution point in the debugger
- Initial portion of MISRA C and C++ checks
- Clang completion snippets
- More Makefile projects support
Today the new 2020.3 EAP build for CLion is available! Here is a brief overview of the highlights you will find in this new EAP version:
- Improved Google Test support.
- Recompile single file is now available for Makefile projects.
- Enhancements for Qt projects: code completion for Qt signals and slots, Qt-styled auto-import, updated Qt project templates.
- More accurate code completion for templates.
- Notification on Clang-Tidy update.
- More MISRA checks, WSL for SUSE 15.2, and more.
Build 203.4818.55 is available from our website, via the Toolbox App, or as a snap package (if you are using Ubuntu).
Enhanced Google Test support
CLion supports the top most popular unit testing frameworks for C++ and also comes with a built-in CTest runner for CMake projects. In addition to working on CTest in 2020.3, our team focused on making several improvements to Google Test integration and the built-in test runner in particular:
- CLion now shows the full test tree in the built-in test runner, while executing tests one by one.
- For parameterized tests, CLion now shows test parameters right in the test tree.
Disabled tests (those with the
DISABLEDprefix in their names) are now also shown in the test tree with the corresponding icon.
Incidentally, our 2020 research shows that 31% of C++ developers are using Google Test, making it the most popular unit testing framework in the world. We hope the above improvements make your experience with Google Test in CLion smoother and more productive.
Recompile single file action for Makefile projects
To speed up the development process, you might sometimes want to compile one file without building the whole project. For this purpose, CLion provides the Recompile action. And now it works for Makefile projects! Use
Ctrl+Shift+F9 on Windows/Linux and
⇧⌘F9 on macOS, or simply call it via Build | Recompile ‘file name’.
More help for Qt projects
So far in the 2020.3 EAP, we’ve already announced new Qt templates for Qt Console Executable and Qt Widgets Executable project types. In this build we’ve improved the New project dialog for these templates, adding Qt CMake prefix path field and Qt version:
The templates themselves were also updated.
The signals and slots mechanism is a central feature of Qt, as these are the entities used for communication between objects. CLion now understands when signals or slots have to be completed, and filters only the corresponding members in the completion dropdown. For example, for signals:
And of course,
SLOT macros are also available in code completion in such locations, while all unrelated class members are filtered out.
And finally, Qt-style auto-import is now supported in CLion. For example, for the QUrl type the
#include will be suggested:
More accurate code completion for templates
Since moving code completion to our Clangd-based engine in CLion we’ve significantly improved it. It has become faster and more accurate, and we are continuing to improve it. This time we fixed a couple of code completion issues for templates.
- Fixed: No completion for container elements in the function template is shown (CPP-20919).
- Fixed: Completion does not work correctly with template types (CPP-22204, CPP-19682).
Clang-Tidy update notification
CLion uses the Clang-based language engine and Clang-Tidy from the corresponding LLVM revision. The version of the built-in Clang-Tidy can be checked in Settings/Preferences | Languages & Frameworks | C/C++ | Clang-Tidy. We release Clang updates quite often. This means that you might find some new checks in CLion. Or, on the contrary, some of the newer checks might not be shown in CLion when the ‘-*’ pattern is used in the configuration files.
We’ve introduced a notification that will tell you when Clang-Tidy has been updated to a newer version, so that you’ll know you might need to update the configuration files.
And if you click the Review link in the notification, you’ll get a list of the available new checks and their activation state according to the current configuration file:
If you don’t rely on the CLion config for Clang-Tidy and use your own config instead, the notification will also warn you that “clang-tidy files may overwrite your IDE settings”. In that case, you can check your .clang-tidy config files manually.
A few important limitations to note:
- You likely won’t see the notification right now, as we’ll use the current 12.0.0 version as a baseline and then compare against it during the next Clang-Tidy update.
- This won’t work for downgrades.
- This is not available for custom Clang-Tidy binaries selected in CLion, only for the bundled binary.
- For now, the notification is shown only once per new IDE version launch, but the Clang-Tidy config settings can differ from project to project. We are still looking for an elegant solution to this, and are welcome to ideas.
Other enhancements include:
- CLion’s WSL support can now pick the openSUSE-Leap-15-2 distributive correctly.
- We continued our work with the MISRA checks in CLion and added a few more. We are eager to know if you typically use MISRA C++ guidelines with C++11 or higher. We’ve already had some answers from our Twitter followers. If you would like to add your opinion to this discussion, please let us know in the comments.
Git tab was added to the Search Everywhere dialog. There you can find commit hashes and messages, tags, and branches:
- Now the two most popular buttons – Commit and Commit and Push… – are explicitly shown on the Commit screen.
- Git tab was added to the Search Everywhere dialog. There you can find commit hashes and messages, tags, and branches:
Your CLion team
The Drive to Develop
Subscribe to Blog updates
Thanks, we've got you!
CLion 2023.3 EAP2: Support for Device Tree Files and Meson
The CLion 2023.3 Early Access Program has just started, featuring assembly view for files, enhanced C++ data flow analysis, and other updates. The CLion 2023.3 EAP2 build is ready for you to try! With it, you can finally start working on Meson projects in CLion and benefit from device tree format s…
The CLion 2023.3 Early Access Program Is Open
We recently shared our preliminary plans for v2023.3, which we plan to release at the end of November. We are now happy to announce that the CLion 2023.3 Early Access Program (EAP) starts today! Our EAP lets the community participate in discussions devoted to our products and influence the developm…
CLion 2023.2.2 Bug-Fix Update
The CLion bug-fix update 2023.2.2 is now available! The fixes included in this bug-fix update are listed below. Download build 232.9921.42 from our website, through the Toolbox App, as a snap package for Ubuntu, or via a patch from inside the IDE. DOWNLOAD CLION This update’s main highlights includ…
CLion 2023.2.1 Bug-Fix Update
The CLion bug-fix update 2023.2.1 is now available! If you haven’t yet upgraded to v2023.2, now is definitely a good time to do so! The key enhancements in the major 2023.2 update include: The Beta version of AI Assistant is now available as a plugin with limited access. Streamlined integratio…