CLion 2021.1 EAP: New MISRA C and C++ Checks, and Core Dump Debug Enhancements
The new CLion 2021.1 EAP build (211.6432.9) is now available. You can get it from our website, via the Toolbox App, or as a snap package (if you are using Ubuntu). Note that if you are on macOS, there is a separate build for Apple Silicon (M1 chip).
More MISRA C and C++ checks
We continue our work on extending the list of supported checks. You can find the current list of supported checks on our confluence page here. We keep this page updated so that you can easily get a sense of the current state of the support, i.e. how many checks are covered by CLion. We’ve added a few new rules this week:
- The condition of an if-statement and the condition of an iteration-statement shall have type bool. The first operand of a conditional-operator shall also have type bool.
- Named bit-fields with signed integer type shall have a length of more than one bit.
A few rules for throwing, like NULL shall not be thrown explicitly, and an empty throw (
throw;) shall only be used in the compound-statement of a catch handler.
We’d like to remind you that MISRA inspection settings can be found in CLion in Settings/Preferences | Editor | Inspections | C/C++ | General | MISRA Checks. You can configure the list of C and C++ checks to run on your project.
In the previous release, CLion v2020.3, we added an ability to debug with core dumps. This helps you investigate the reason for a process crash by debugging the generated core dump right in CLion. In this EAP build we are happy to announce a few improvements to it:
- If the crash happened in binary that does not have debug symbols, you still can debug it in CLion by providing symbols to the debugger explicitly (for example, via a non-stripped binary as a symbol file). This already worked for GDB when 2020.3 was released, and with this EAP it now also works for LLDB.
The Core Dump Debug run configuration now allows you to set the sysroot. This option is essential for debugging core dumps from binaries built on other systems where the libraries are located in some non-default location. Specifying this path in the new field will allow CLion to locate the library symbols correctly:
The full release notes are available here.
Your CLion team
The Drive to Develop