Developing a Makefile-based project? Benefit from CLion’s smart features – CLion now comes
with Makefile project support out of the box. Open a folder with a top-level Makefile as a
project, or directly point CLion to a Makefile in the Open dialog. The IDE will run
make (with the
--just-print option to avoid running an actual build),
parse the output of the make command, and load the project. Check out the details, known
limitations, and a long list of projects we’ve tested our approach with in this
The CMake Profile settings under
Build, Execution, Deployment | CMake have a
newly polished UI, with a few useful tips added for the settings there. In addition, several
actions for CMake projects are now available in Find Action, and you can assign a shortcut
to any or all of them if you use them regularly:
CLion now bundles CMake 3.17 and adds initial support for two of its most recent features:
-G "Ninja Multi-Config"generator option to get CLion build files generated for every configuration (note that, temporarily, CLion will still use only one selected configuration for the CMake profile).
target_precompile_headerscommand to add header files to the
INTERFACE_PRECOMPILE_HEADERSproperties of a target. CLion will treat such precompiled headers correctly.
The Recompile single file action helps speed up the development process by quickly checking local changes, and it is now available for Ninja and other generators used in CMake and supported in CLion.
Thanks to an important bug fix, CLion can now build multiple independent projects in parallel, without them blocking each other from starting.
Code analysis in CLion 2020.2 got a massive update, increasing the accuracy of many checks and covering more cases. This version also continues the work of polishing the Data Flow Analysis, reimplemented previously on top of the Clangd-based engine.
Pointers that point to invalid data lead to run-time issues. Typical cases are double-free and use-after-free combinations. CLion now catches such dangling pointers if they appear in the local scope, no pointer arithmetic is involved, and macros are not preventing CLion from performing the analysis.
The Simplify code inspection is now more accurate and covers more cases. It works for the following types of statements:
condition == true.
condition1? true : condition2.
if(condition1) return true; return condition2;
The cases can be configured separately in
| Editor | Inspections | C/C++ | General | Simplifiable statement
This CLion inspection detects situations where a loop condition is not updated inside the loop. It’s similar to Clang-Tidy’s clang-tidy:bugprone-infinite-loop but works for loops with exit points and can handle cases with lambdas or references.
The Unused code inspection has been massively overhauled. Among other changes, it now
works for type aliases, for both globally and locally defined
Last but not least, we’ve introduced a new Inspection Widget. It displays the number of warnings and errors in the current file and lets you navigate between them with ease. You can also configure the highlighting level (just like you could previously with the so-called Hector icon).
If you click on the Inspection Widget, the Problems View tool window will open
View | Tool Window | Problems).
It shows the list of warnings and errors in the current file, helps you navigate to the
place in your code where the problem was encountered, and allows you to fix the issues by
invoking the Alt+Enter shortcut right from the tool window.
This year officially brings a new language standard to C++ developers, and CLion already comes with support for many of its features. The language engine in CLion 2020.2 is also generally more stable on C++20 code.
Newly added keywords are supported by CLion 2020.2 in code highlighting and completion:
Code completion in designated initializers now works for fields from a base class.
explicit(bool) construct is now highlighted correctly. It’s also
equipped with name hints for condition arguments and is supported in navigation and
for loops with the
init statement are now supported.
This includes refactorings like Rename for variables in the loop.
A new inspection for code that uses Concepts has been added. It suggests constraining local variables declared as auto if the result of a constrained function call is assigned to them.
These types of tests in Catch2 are now recognized and handled just like the other test types.
GTEST_SKIP() macro in Google Test provides the ability to skip tests at
runtime. This is now supported by CLion.
CLion 2020.2 improves the user experience by adding coverage flags automatically when you
click the Run with Coverage button. Now, if your currently selected CMake profile
doesn’t include compiler options for coverage, CLion will search for a CMake profile (and
create one if not found) with the coverage flags passed via
For embedded development, we’ve updated a plugin for PlatformIO, bringing significant improvements:
PlatformIO project configuration files are now highlighted properly, so you can read and update them more easily.
When a new project is created from the New Project Wizard in CLion, many useful Run/Debug
configurations are added automatically. For example,
_TEST, and many others.
CLion now automatically creates CMake Profiles for the
CMAKE_CONFIGURATION_TYPES entries in the PlatformIO CMake project.
If you develop with the WSL2 toolchains and use Git on WSL2, you will now benefit from CLion
switching between Git executables depending on the project location. It will auto-detect the
Git executable from WSL2 for projects opened from there (via
\\wsl$ path) and
switch all Git-related features to work with it.
CLion 2020.2 introduces a new and more spacious view for GitHub Pull Requests. It shows all the details of a particular pull request (like messages, branch names, author, assignee, changed files, commits, and timeline) and displays the results of the pre-commit checks. It also helps with many actions like start a review, request reviews, attach comments, or merge pull requests from within the IDE.
The Go to Declaration or Usages action (Ctrl+Click / Ctrl+B) behaves differently depending on the case and the IDE settings:
Settings | Editor | General | Go to Declaration or Usages.
A few UI freezes and slowdowns have been fixed. 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 this saves the IDE from redundantly reparsing activity.
In version 0.3 of the plugin, the new engine for macro expansion, which until now had been experimental, is enabled by default. This engine handles macro-generated
impl blocks and module declarations, providing code insight for the entirety of your code, including crates like
async-std. Learn more in this blog post.
Another major update is the introduction of initial debugger support for Rust’s MSVC toolchain. Now you can use the LLDB-based debugger bundled in CLion for the Visual Studio toolchain to debug Rust code built on Windows using Rust’s MSVC.
Other enhancements include new refactorings (Move for files and top-level items and
Introduce Constant), initial support for
or_patterns, error highlighting in format literals inside macros like
println!, rendering for documentation in the editor, inlay hints for chain method calls, and improvements to the debugger workflow in IntelliJ IDEA.
Settings | Languages & Frameworks | C/C++ | Clangdnow includes information on the LLVM Clang revision used, so you will know what to expect in terms of C++ support and built-in Clang-Tidy checks.
If you use the IAR compiler/toolchain in your embedded projects, you can now do so in CLion. Collecting compiler information no longer fails, which means projects using the IAR toolchain load successfully and work in CLion.
A few things to note here:
PlatformIO is a new generation ecosystem that is gaining popularity quickly. To benefit from it in your embedded projects, take advantage of a new PlatformIO for CLion plugin, which:
And much more! Check the official documentation for details.
Code in CUDA C and C++, including all CUDA specific extensions, is now parsed and highlighted correctly. This means code navigation, code documentation, and other code assistance actions work in CUDA code. Additionally, CLion can complete angle brackets for kernel calls.
Let's clone the ClaraGenomicsAnalysis project from GitHub and check out what CLion is capable of in terms of CUDA support.
The New Project wizard in CLion has been updated with a new option to create CUDA projects – libraries or executables. When selected, it generates sample CMakeLists.txt and main.cu files for you.
New supported CUDA file extensions – .cu and .cuh – are available in the new C/C++ file creation dialog. And the list of possible targets to update in this dialog includes both general CMake and CUDA specific targets (created with
We have now made it possible to use clang-cl in CLion on Windows, with versions 8.0 and later supported.
You can install it from the LLVM website or along with the Visual Studio tools. When done, select the Visual Studio toolchain in CLion and point to clang-cl.exe in the toolchain settings.
The LLDB-based debugger for the Visual Studio C++ toolchain developed by JetBrains is now the default debugger for this toolchain. So you can start using it right away!
Note that bundled support for native visualizers should be enabled explicitly in
Settings | Build,
Execution, Deployment | Debugger Data Views | Enable NatVis renderers for LLDB.
Remote GDB Server and Embedded GDB Server configurations now work with custom targets. These configurations, which previously only worked with CMake targets, allow you to debug your application on a remote host or on the microcontroller from the CLion instance running on your local machine.
If you have already created these configurations, CLion 2020.1 will store previous Run/Debug
Configuration settings in the
projectFilesBackup directory in the project
folder and will notify you about this.
You can now use Path Variables and macros in the Program Arguments and Working Directory fields in the CMake, Custom Build, and Gradle Native Applications configurations. Macros help you get values for:
FilePrompt/Prompt macros can be used to show a file chooser dialog or string input dialog when running/debugging the configuration.
Path Variable can define a path to the library that is used widely in your projects but is located outside the project directory.
If you need to redirect input from a file to the stdin of your application, you can now do that. Use a new field in the configuration called Redirect input from. Enter:
CLion's Data Flow Analysis (DFA) does what a compiler doesn't normally do for you: It analyzes how the data flows through your code and detects potential issues based on the results. It catches conditions that are always false/true, endless loops, missing return statements, infinite recursion, and more. And with 2020.1, DFA has moved to the Clangd-based language engine to become more accurate and less heavy in terms of performance. This is still a work in progress, but some good results are already available!
A new mode, in which completion is fully provided by the Clangd-based language engine, is on
by default. This mode solves the prioritization and ordering issues that occurred when code
completion results from several engines were mixed. This behavior is controlled by the
Code Completion setting in
Settings | Languages &
Frameworks | C/C++ | Clangd.
Dozens of various fixes and enhancements make this new mode accurate and powerful.
Now, when you first open a project with a .clang-format config file in the project root, CLion will detect it and switch to ClangFormat for you automatically.
If you enable ClangFormat on a project that doesn't have a .clang-format config file, CLion will suggest creating one for you.
When a .clang-tidy config file is detected in the project, CLion now automatically turns
off the use of the IDE settings for Clang-Tidy. The behavior is controlled by
Prefer .clang-tidy files over IDE settings in
Settings | Editor |
Inspections | C/C++ | General | Clang-Tidy.
Struct member fields and class member fields now have separate naming settings. Check them out in
Settings | Editor | Code
Style | C/C++ | Naming Convention.
#pragma region and
#pragma endregion can be used in CLion for code
When calling the Change Signature refactoring (Ctrl+F6), CLion updates all the usages of the function. A new Default value field in the Change Signature dialog offers the ability to specify the value of the parameter to be used across all usages. Keep it blank to use the default value type as before.
The same logic and a new Default value field apply to the Create Parameter From Usage quick-fix and the Add Parameter to Constructor intention.
Quick Documentation – a universal tool to preview documentation and get information about function signature, inferred types, and macro replacement – is now available on mouseover.
It can be controlled by the setting Show quick documentation on mouse move in
Settings | Editor | Code Editing.
The default font in the editor has been changed to JetBrains Mono, a new open source font created by JetBrains. It's been designed specifically to make reading code easier.
A new default light theme – IntelliJ Light – is now the standard theme across all the different operating systems. Use View | Quick Switch Scheme | Theme to select a non-default theme if you wish.
With CLion 2020.1 you can split terminal sessions vertically or horizontally so that you can run them side by side. You can invoke the context menu from the Terminal to create, navigate, and close a split terminal session.
An updated tool window provides more space for the list of modified files and the diff. It also lets you add changes to a commit when they are ready, compose a commit message iteratively, and choose which of the staged changes go into which commit.
The new UI is enabled by default for new users; existing users can switch to it in
Settings | Version Control | Commit.
An updated, truly interactive dialog makes it possible to:
The Version Control tool window is now called the Git tool window, or Subversion/Mercurial/Perforce if you are using any of these instead of Git.
You no longer need to pre-install Git manually! When you open a project using Git or import one from the VCS, if you don't have Git on your machine, CLion will offer to download and install Git for you.
With improvements to LLDB support, IntelliJ Rust now properly renders enums and primitive types, and it also shows demangled function names in the call stack.
Another major update that has landed in the plugin is REPL integration. Invoke the console from Tools | Rust REPL and use it for prototyping and checking your code line by line. The integration provides syntax highlighting and code completion, along with some handy console actions: command history, soft wrap, quick scroll to end, and others.
On the language-support side, IntelliJ Rust now handles
impl blocks for type aliases.
Taking performance into account, we've only enabled this feature for types with a limited
number of aliases.
Other enhancements include highlighting for unused local variables, fixes in
support, and the new Lift return inspection.
Settings | Tools | SSH Configurations.
This release of CLion is quality-targeted with lots of performance improvements made throughout. The key enhancements affect code completion, the Rename refactoring, optimizations for the Building/Updating symbols step, and the elimination of UI freezes.
Clangd is now added to the list of code completion providers in CLion, which helped speed up the time for the first results to appear on many projects significantly. Check out the detailed performance metrics we’ve gathered.
The Rename refactoring in CLion is really powerful as it can rename not only code usages
but also usages in string literals and comments. If you still want to rename only code
usages, it’s now much faster as it can ask you to make this decision before the
actual search. (To use this, turn off
Settings | Editor | General | Refactorings | Enable in-place mode.)
Support for the new CMake File API lets CLion 2019.3 enable various CMake generators (requires CMake 3.15 or higher). Previously, only Makefiles were supported, now users can select Ninja, Xcode, Visual Studio, etc.
This works for all platforms, in remote mode, and with WSL.
To simplify the configuration process for your new CLion projects, you can now configure
one or more default CMake Profiles, which will be used for all your new projects. Use
File | Other Settings | Settings for New Projects…
If you want to debug an executable on a remote machine from a locally running CLion, you can now use the Remote GDB Server configuration. CLion will upload the executable and launch your program under gdbserver, so there’s no need to do it manually anymore.
In CLion 2019.3, the bundled LLDB on macOS and Linux was updated to v9.0. Besides this, a major clean-up was performed in the bundled LLDB pretty printers, fixing a whole set of related issues.
If you want to customize the GDB/LLDB debugger behavior on a particular project, you can now do so in CLion, as it supports reading the settings file from the project root directory.
One of the biggest features coming in C++20 is definitely Concepts. By collaborating with the author of Concepts support in Clang, we’ve brought Concepts to CLion 2019.3. The support covers not only code parsing and highlighting (which is done by the Clangd-based language engine), but also comes with:
To prevent situations where virtual functions access resources that are not yet initialized or have already been destroyed, CLion gets a new inspection which detects virtual functions called from constructors or destructors.
The Spell Checker is useful for keeping the code accurate and readable. CLion has had it for C/C++ code for a long time. In v2019.3 we’ve enabled it in CMake and Doxygen comments.
If you’ve ever asked the question, “Was this statement executed during the configuration run?”, that means you are looking for statements coverage measuring for your code. CLion 2019.3 has it thanks to the integration with llvm-cov/gcov tools.
You can get it for unit tests run or a regular configuration run. The results are available in the Coverage tool window or via a color indication in the editor’s left gutter.
A new action to switch between header/source files was added. It’s more accurate and quicker for many C/C++ cases than Go to Related Symbol.
If multiple options to navigate to are identified within 500 ms, CLion shows an interactive popup where new items are added and you can select where you want to navigate to.
There is also a built-in mechanism to remap the shortcut from Go to Related Symbol to this new action, should you want to.
In CLion, you can configure a set of formatting options and naming convention rules. Or, alternatively, you can inherit these settings from one of the predefined styles. In CLion 2019.3, we’ve added Microsoft’s predefined formatting and naming style to the list.
Windows Subsystem for Linux provides a convenient way to develop on Windows for Linux target platform. CLion natively supports the WSL environment and now comes with support for WSL version 2. The configuration process in CLion is completely the same for WSL v1 and WSL v2!
One of the biggest updates for IntelliJ Rust is the initial support of
cfg attributes. Now, the conditionally disabled blocks are grayed-out
and excluded from resolve and code analysis. Among the supported
The widely used quick-fix, Auto-import for unresolved symbols, now works automatically when you call Implement members, Specify type explicitly, Add remaining patterns, and other code generation actions.
Other changes include Code Coverage for your Rust code, which has been a part of the
plugin for a few releases already, handy interactive inlays for type hints, and
include! macro support.
VCS | Get from Version control) was reworked. Now you can log in from the dialog, or if you’re already logged in, the IDE will instantly preview the lists of all repositories grouped by accounts or organizations.
Settings | Appearance & Behavior | Appearance | Use contrast scrollbars.