Early Access Program News

CLion starts 2020.1 Early Access Program: improvements to Clang-based tools and debugger, new font and editor theme, and more

Hi,

We’ve got a lot planned for 2020 and 2020.1 and now it’s time to start our regular Early Access Program!

EAP builds are free and give you a preview of the upcoming changes and enhancements. They might not be stable and might contain functionality that doesn’t make it to the final release. And if you decide to try these builds, please, inform us of any issues you run into or any inconveniences you experience as early as possible, so we have time to investigate and can try to address them before the release.

CLion EAP launched

You can download the first EAP build (201.4515.29) from our site, via the Toolbox App, or as a snap package (for Ubuntu) and install it side by side with the stable release build.

DOWNLOAD CLION 2020.1 EAP

Clang-based tools in CLion

Clangd-based code completion

Clangd-based code completion, introduced in CLion 2019.3, has been significantly improved thanks to dozens of various issue fixes, for example:

  • Missing keywords, like switch, try, catch, and others, were added to the completion lists.
  • Operators have been added to the completion list.
  • Completion after a dot has been added in structure initialization:

Structure completion

ClangFormat

If you turn ClangFormat on in CLion settings, then CLion will use it not only for formatting the code or the reformat action, but also for indenting after Enter or Backspace are pressed. This makes the indentation more accurate.
Besides, if you enable ClangFormat on the project without .clang-format config file, CLion will suggest creating one for you. The configuration will be similar to the one you currently have in CLion’s own code style settings. You may refuse, then ClangFormat will be enabled with the default LLVM style.
ClangFormat config creation

Additionally, we are now working on enabling ClangFormat by default in cases where a ClangFormat config file is found in the project root. This change should arrive later during this EAP program.

Clang-Tidy

Similarly, when a .clang-tidy config file is detected in the project, CLion now turns off the use of the IDE settings for Clang-Tidy automatically. If you prefer the previous behavior, uncheck the Prefer .clang-tidy files over IDE settings in Settings/Preferences | Editor | Inspections | C/C++ | General | Clang-Tidy.

Data Flow Analysis

CLion’s Data Flow Analysis (DFA) is a set of powerful checks that most compilers don’t do. These checks have been available in CLion from the very early versions of the product. They analyze how the data flows through your code and detect potential issues based on that. For example, DFA detects that the second condition in the second if clause is always true when reached in the code sample below:
DFA
DFA can also detect endless loops, missing return statements, infinite recursion, and more.

DFA can catch lots of potentially serious problems. However, it requires very accurate code parsing and resolve, and it can take a significant amount of time. Especially, when the underlying resolve is slow. That’s why in 2020.1 we’ve moved DFA to a Clangd-based engine. This is still a work in progress, and many known issues are linked to the parent ticket CPP-17578 (like, for example, some issues with DFA when macros or templates are used, or the issue with the inspection settings CPP-17707). Feel free to report any new issues you find to our issue tracker.

Debug

Debugging of custom targets

Remote GDB Server and Embedded GDB Server configurations allow you to debug your application on a remote host or at the microcontroller from the CLion running on your local machine. Previously, only CMake projects were supported as the configuration worked only with the CMake targets. Now we’ve also added custom targets support there. For example, if you work with the embedded project using Makefiles as a project model, you can now simply follow our workaround via the compilation database to get a Makefiles project to work in CLion and then use the custom targets to build your project locally and debug remotely on a microcontroller.

Note, if you have already created any of these configurations in CLion v2019.3 or earlier, when you first open such a project in 2020.1, CLion will store previous Run/Debug Configuration settings in the projectFilesBackup directory in the project folder. You’ll be notified about this in the editor:
Convert project

New EAP build also improves the Embedded GDB server workflow. CLion now stops the debugger correctly if you close your project. Additionally, the Embedded GDB Server configuration now automatically uses the configured Reset command after the executable has been downloaded.

Debugger for the Visual Studio C++ toolchain

Some time ago we bundled the LLDB-based debugger that is suitable for debugging applications compiled with the Microsoft Visual Studio C++ toolchain. This is an experimental debugger developed by the JetBrains team, so in its early stages it was added to CLion as an experimental feature, but disabled by default.
Now, the debugger for the Microsoft Visual C++ toolchain is enabled by default! Which means that for this toolchain it will be the default debugger and you can start using it right away! Still, to enable bundled support for native visualizers, use Preferences/Settings | Build, Execution, Deployment | Debugger Data Views | Enable NatVis renderers for LLDB.
Please share your feedback with us on how the debugger works for your projects in our tracker or here in comments! We’d love to know in which direction you’d like us to further improve it.

Editor

Quick Documentation on mouseover

The Quick Documentation popup works as a universal tool to get more information about a code element that is under the caret. Not only does it preview the code documentation, but it also provides information about function signature, inferred types, and macro replacement. And now in 2020.1, it’s available on mouseover!
Documentation on hover
The behavior can be controlled controlled using the setting in Editor | General | Other | Show quick documentation on mouse move.

JetBrains Mono

You’ve probably already noticed that the default font in the editor has changed! We’re excited to introduce our new open source font – JetBrains Mono. This font was created in pursuit of the very ambitious goal of making working with code more comfortable for everyone. Try it out in this EAP build and let us know whether we are getting close to achieving it! ;)

IntelliJ Light

The light theme is now unified for all operating systems under the name IntelliJ Light. If you are experiencing any issues with it, you can roll back to the previous look and feel in Settings (select Classic Light).

Other improvements

The first CLion 2020.1 EAP build comes bundled with CMake v3.16.

CUDA users will be happy to learn that we’ve fixed the long-standing issue with the launch of CMake CUDA targets that used to run a wrong binary (CPP-10292). We have more improvements planned for CUDA, so stay tuned!

Code Coverage was introduced in CLion 2019.3 and it now works for out of source builds.

Several VCS improvements from the IntelliJ Platform have also been added in this build:

  • The branches popup benefits from an explicit search field and incoming (blue) and outgoing (green) commit indicators next to the branch’s name.
  • A new, truly interactive Rebase from Here dialog has been introduced.
  • New Commit tool window.

You can read more in these IntelliJ IDEA blog posts (1, 2).

DOWNLOAD CLION 2020.1 EAP

Your CLion team
JetBrains
The Drive to Develop

image description

Discover more