CLion Starts 2020.2 EAP: Performance Fixes, Catch2 and PlatformIO Integration Enhancements, New CMake Actions, and More Accurate Code Analysis
We’re ready to launch the CLion 2020.2 Early Access Program!
We still have an interesting path ahead of us, but we are now ready to show you some of the valuable improvements we’ve made and to get your feedback. So please join us for this EAP – we’d love to welcome you aboard!
As usual, the EAP builds are free to use and no license is required. The main goal is to test the tools in all kinds of non-standard and unusual environments you may have set up, so we can make sure we haven’t missed anything. If you come across any bugs or peculiar behavior, please report them to our issue tracker so we can collect and fix as many issues and regressions as possible.
Build 202.5103.16 is available from our website, via the Toolbox App, or as a snap package (if you are using Ubuntu).
Here are the main highlights:
- Performance improvements.
- More sophisticated support for the Catch2 framework for unit testing.
- Enhancements in the debugger for Microsoft Visual C++ toolchain.
- Code analysis and refactoring improvements.
- Updates to PlatformIO plugin.
- CMake IDE actions.
- New VCS features to manage GitHub Pull Requests right in the IDE.
- Clangd-based engine update.
When you type in the editor, the IDE reparses the corresponding code pieces on the fly to provide you with some smart assistance. Typing inside a macro definition can be tricky for the IDE, as it has to correctly understand the moment the macro ends and the regular code starts in order to update the AST accordingly. To avoid editor performance degradation, CLion now inserts a backslash on pressing Enter inside the macro definition. The macro definition will quite likely be continued on a new line, so the IDE inserts the backslash for you automatically before moving the caret to a new line.
This EAP build also comes with a fix to the IDE freeze that was happening when Sanitizer’s output visual representation was enabled (CPP-16010), as well as a fix to infinitely reading the profiler output in some cases (CPP-20096).
We’ve also reworked the documentation popup to avoid several cases where it blocked the UI.
In terms of Unit testing frameworks, CLion comes with support for Google Test, Catch(2), and Boost.Test. This EAP brings support for Catch2 template tests. They are now recognized and handled just like the other test types:
Debugger for Microsoft Visual C++ toolchain
On Windows, you can select from MinGW, Cygwin, WSL, and the Visual Studio toolchain. In the case of the latter, a debugger implemented by JetBrains based on LLDB is used and it has been given a significant number of improvements:
- Debug sessions no longer freeze on stop. (This used to happen when the target process spawned another child process that was later detached.)
- A bug when child members weren’t shown for some values is now fixed.
- Threads are now named automatically based on their entry-point function.
- The debugger got significant performance improvements, and many freezes and crashes were fixed.
- Fixes for stepping issues in multithreaded code, fixes for floating-point type variables and arguments, and much more.
Code analysis and refactoring improvements
The ‘unused code’ inspection now works for type aliases and detects when they are not used. This works for globally and locally defined
In CLion 2020.1, Data Flow Analysis was moved to the Clangd-based language engine to enable it to be more accurate and less heavy in terms of performance. We are continuing to work in this direction and have introduced several fixes for DFA-related problems in CLion 2020.2 EAP, including:
- False warning about unreachable code (CPP-19266).
- Invalid code block highlighted when an endless loop is detected (CPP-19084).
- False warning Condition is always false when a value is changed from pointer (CPP-3583).
- Duplicated DFA notification, and more.
Additionally, CLion no longer suggests replacing the
if constexpr condition with the ternary operator – which only makes sense for a regular
if else condition. And the Rename refactoring doesn’t fail incorrectly with a Local variable already exists in the scope error (CPP-3054).
Updates to the PlatformIO plugin
CLion 2020.1 introduced a plugin for PlatformIO that helps you start an embedded project faster. A new version is now available and it has been given several significant improvements:
- Highlighting is now available in platformio.ini files:
- Many useful Run/Debug Configurations for running PlatformIO-based projects are now added automatically when a new project is created (previously, only configurations for debug and upload were created).
- CLion now creates CMake Profiles for the
CMAKE_CONFIGURATION_TYPESentries in the PlatformIO CMake project (CPP-19478):
CMake IDE actions
There are a few actions for CMake projects now available in Find Action. You can call them from there, or assign a shortcut to any or all of them if you use them often:
- CMake Settings
- Stop CMake project reload
- Open CMakeCache file
VCS: GitHub Pull Requests
Support for GitHub Pull Requests has been improved significantly with 2020.2. You can now fully interact with all the pull requests associated with the repository:
- Welcome a new and more spacious view for GitHub Pull Requests. Simply double-click on any pull request you need from the list, and the IDE will display all of the information about it, including messages, branch names, author, assignee, changed files, commits, timeline, and more:
- View the results of pre-commit checks in the dedicated panel.
- Start a review, request reviews, attach comments, and submit reviews – all from within the IDE.
- View and interact with comments, both commit level and line level.
- Merge pull requests from within the IDE.
No more switching to the browser or another tool! The entire Pull Request workflow is at your fingertips in CLion and other IDEs on the IntelliJ Platform. Learn more.
Clangd-based engine update
For quite some time now we’ve had two language engines in CLion – CLion’s own engine and another one that we implement on top of Clangd. The latter is used for code highlighting, completion, code analysis (together with our own code inspections), some navigation actions, and more. We’ve had this engine enabled by default for several releases now and we’re seeing encouraging feedback from our users. We constantly improve it by fixing any cases when the engine crashes or behaves incorrectly, and we do our best to stay aligned with the latest LLVM Clang version. The original CLion engine is not evolving fast enough and many actions in CLion now rely on the Clangd-based engine.
So from now on, the Clangd-based engine is the default language engine in CLion and the option to turn it Off has been removed. Instead, if you experience any issues with this engine, please report them to our team. We’ve also added some information about the LLVM Clang revision used for the Clangd-based language engine so that you know what to expect in terms of C++ support and built-in Clang-Tidy checks:
Other important fixes include:
- When you have several independent projects opened in CLion, builds were previously running in sequence (which means one build running was preventing another one from starting). Now they run in parallel.
- The Recompile single file action is now available for Ninja and other generators used in CMake and supported in CLion.
- Fixes to Clangd-based completion to make it more accurate and reliable (CPP-19807, CPP-19990, CPP-20121, CPP-20276, CPP-20352).
- A new setting to specify the default encoding for consoles (used to decode process output) is now available in Settings/Preferences | Editor | General | Console.
The full release notes are available here. There are more than 100 fixes included, so make sure to try out the new EAP build today!
Your CLion team
The Drive to Develop
Subscribe to Blog updates
CLion 2024.1 EAP 3: Assembly View Enhancements
Today, the CLion 2024.1 EAP 3 build (241.12662.59) is available from our website, via the Toolbox App, or as a snap package if you’re using Ubuntu. Here are the main improvements: Assembly view improvements: The Assembly view for ARM targets is now shown correctly (CPP-36901). Assembly vi…
CLion 2024.1 EAP 2: Improved Terminal and Other UX Enhancements
Some time ago, we shared our plans and directions. Just a couple of weeks ago, we kicked off our CLion 2024.1 EAP with CMake coding assistance, code analysis in device tree files, and forked processes debugging. Today, the CLion 2024.1 EAP 2 build (241.11761.23) is available from our website, via…
CLion Nova: AI Assistant and Enhancements From CLion Classic and ReSharper v2024.1
CLion Nova is a free preview of CLion equipped with the ReSharper C++/Rider C++ language engine. With this update, CLion Nova has finally moved to the 2024.1 branch. This means that all of the enhancements brought by the CLion Classic 2024.1 EAP are now available in CLion Nova: CMake writing ass…