What's New in CLion

With this year’s first update, CLion 2018.1, you get enhanced C++17 support, new CMake actions, various editor improvements, and a more responsive editor.

Windows users can benefit from support for Windows Subsystem for Linux, which makes it possible to compile, run, and debug Linux-compatible binaries while working on Windows, and even run them with Valgrind Memcheck.

2018.1 (Mar 28)


WSL config

Linux toolchain on Windows

If your project requires a Linux toolchain while being developed on Windows, you can now use Windows Subsystem for Linux (WSL) in CLion running on Windows.

Configure WSL and the corresponding toolchain under Settings | Build, Execution, Deployment | Toolchains, and then you’re ready to use it in CLion. Header search paths on WSL will be used, and the Linux binary will be created for you to run and debug on WSL.

Learn more
WSL Valgrind

Valgrind Memcheck on WSL

Valgrind Memcheck can detect dozens of memory errors and leaks and is now available for Windows users on WSL.

Turn on a WSL toolchain, make sure Valgrind is detected in settings (Settings | Build, Execution, Deployment | Valgrind), and then compile and run regular and test targets under Valgrind Memcheck to detect possible errors and leaks. View the results in a special tab in the Run tool window.

C++ support

if with initializer

C++17: If and switch with initializers

To avoid polluting an ambient scope or creating an artificial scope for initializers in if and switch operators, C++17 suggests adding an initializer to if and switch conditions. CLion now parses and resolves such statements correctly.

structured bindings

C++17: Structured bindings

C++17 introduced structured binding – a convenient and compact way of binding a list of identifiers to a set of objects. CLion’s C++ language engine now supports this feature and ensues accurate code analysis for it.

Ternary operator

Ternary operator

The ternary operator is now handled correctly in CLion’s code analysis. This means many false warnings and errors are no longer thrown, such as:

  • Red code in the ternary + new operator
  • False positive if std::out is used in the ternary operator
  • Incorrect resolve when initializing a reference from a ternary operator
Rename siblings

Rename and Change Signature for hierarchies

Refactoring hierarchies can be tricky, especially if you introduce a change in a derived function. To make it reliable we made sure that the Rename and Change Signature refactorings update functions in all inheritance branches, including sibling functions.


Clang-Tidy settings

Clang-Tidy options and configs

Now you can provide options to some Clang-Tidy checks (e.g. modernize-use-nullptr) in CLion, under Settings | Editor | Inspections | C/C++ | General | Clang-Tidy.

If you prefer .clang-tidy config files instead of the IDE-provided settings (for example, because you store these config files in a VCS for the whole team to access and use in various IDEs), you can configure CLion to respect your existing per-directory configs.


Folding control statements

Code folding of the control statements

Now you can collapse/expand control statements (like if/else, do/while, for, or switch) with a code block that’s longer than one line, or with a code block inside braces. Just use Shift+Ctrl+Period / Ctrl+= You can also hover the mouse over the folded block to preview the content.

Message windows

Message toolwindow: new settings

With v2018.1, you can decide if build output is always necessary (and thus should be visible) or it’s only needed if some warnings or errors appear. Look in the Messages tool window settings for these options:

  • Always Show on Build (Default)
  • Auto-Hide and Show on Warning/Error
Learn more

Breadcrumbs for C and C++

Keep track of your location in C and C++ code with the breadcrumbs – small markers at the bottom of the editor that help you navigate around your code. Right now CLion shows namespaces, classes, structures, functions, and lambdas there.

Learn more
Unwrap blocks

Unwrap/remove code blocks

To accurately and safely remove enclosing parts in complicated code with lots of nested statements, use Unwrap/Remove… action (Ctrl+Shift+Delete). It suggests the options depending on where your caret is and is capable of unwrapping if, else, for, while, do..while and for control statements.


CMake Install

CMake Install

If you have any CMake install targets in your project, you can call Install from the CLion’s Run menu now. The cmake install command will be executed.

Alternatively, you can add an Install step to any of your run configurations in CLion.

non-CMake prj

Open single file and non-CMake projects

While CLion still requires a CMake project to provide smart IDE features, you can now open a single file or folder in CLion which don’t have to be connected to any CMake project.

Follow the built-in notification to select and load a CMakeLists.txt file later. Call Tools | CMake | Unload CMake at any time to unbind your project from the current CMakeLists.txt.

Learn more
Create CMakeLists.txt from template

CMakeLists.txt file template

Create new file (Alt+Insert) now provides an option to create a CMakeLists.txt file.

The content of the generated file is defined by the template in Settings | Editor | File and Code Templates, so you can customize it based on your project’s or team’s needs.

Project scopes

Configure scopes

Predefined and custom scopes

CLion 2018.1 brings several predefined scopes which can help overview your project from different angles, like Project Source Files, Project Non-Source Files, and Changed files.

You can also configure custom scopes, for example a scope that only includes project header files.

Learn more
Switch scopes in Project View

Project view

By default, Project View opens the Project, which includes all project files including the generated folder (like cmake-build-debug) and other excluded folders. Later, you can select between other predefined or custom scopes.

Find in Path with Scopes

Find in Path

To narrow down your search and thus make it quicker and more efficient, use scopes in the Find in Path dialog. All custom scopes created earlier are available in the list.

VCS: Partial Git commits

Select code chunks to commit

Select code chunks to commit

Want to commit only the selected changes from files and leave others for later? Partial Git commits (git add -p) can help here, and now there is support for them provided by CLion here!

To include code chunks in a commit, use the check-boxes in the Diff pane of the Commit Changes dialog.

Add to changelist

Move a change to the changelist

While editing a file, you can see change markers in the left gutter. These not only let you overview the change and roll it back, but also move it to any existing changelist or create a new one and add the current code chunk to it.

Learn more

More languages – more power

Objective-C / Objective-C++ support

Work with files in Objective-C / Objective-C++ added to your CMake project and benefit from the following features (courtesy of AppCode) bundled into CLion:

  • Language syntax support
  • Objective-C inspections (except for the clang analyzer set)
  • Key-value coding support
  • Live and file templates
  • Code style/color schemes

Fortran and Rust plugins

Fortran plugin comes with FORTRAN 77 / 90 / 95 / 2003 and 2008 support. The capabilities include smart editor, navigation actions, code analysis and debugger.

Rust plugin comes with:

  • the Cargo build system on board,
  • updates to CLion’s New Project wizard
  • and a debugger.
Learn more

Other improvements

There are dozens of other useful enhancements in CLion 2018.1. Find out more in our blog.

  • Performance improvements: Important changes were introduced to make the editor more responsive. Incremental highlighting was implemented.
  • MSVC by default: No need to turn on Microsoft Visual C++ compiler support in Registry – now it works by default.
  • Color scheme improvements: CLion now bundles Monokai and GitHub schemes, and comes with lots of fixes to the existing schemes.
2017.3 (Nov 30)

C++ language engine

List initialization

List initialization is a standard way to initialize an object from braced-init-list since C++11. In CLion 2017.3 the support for this language feature was reworked, including fixes for many of the incorrect code analysis warnings. For example:

  • Failed resolve for the members of auto variables initialized with uniform initialization
  • Missing error for lambda capture initializer with multiple expressions
  • Invalid warnings when C99 union initializers are used
  • And others incorrect “too many arguments”, “too few arguments” and “no matching constructor” errors in the code with list initialization

Name lookup

Name lookup is a C++ standard procedure to associate a name with the declaration. This release fixes the situations when the procedure failed in CLion:

  • Resolving a name before the corresponding declaration from the same scope
  • Resolving a name imported via using in some cases
  • Resolving symbols brought into scope by the class inheritance
  • And others
__COUNTER__ support

__COUNTER__ support

CLion 2017.3 correctly increments __COUNTER__ macro value, that means invalid “duplicate declaration” errors are now removed. Quick Documentation (Ctrl+Q) popup in place of the __COUNTER__ macro usage will show the final substituted value.

Generate Definitions improvements

Generate Definitions

Generate Definitions (Ctrl+Shift+D) creates missing implementations for the functions. And now it respects function templates as well.

Besides, Generate function from usage (Alt+Enter) now respects template parameters.

MSVC extensions

Microsoft Visual C++ compiler extensions

While Microsoft Visual C++ compiler support is still experimental, CLion brings support for some specific MSVC extensions:

  • __alignof and __unaligned keywords,
  • pointer type attributes, like __ptr32 and __ptr64,
  • MSVC built-in data types,
  • and some additional format specifiers, like %I32 and %I64

Find a full list on the blog.


JUCE support improvements

JUCE is widely used to develop multiplatform audio applications. CLion 2017.3 comes with multiple fixes to the JUCE library support to avoid various incorrect code analysis warnings and allow proper navigation through the code.

Besides this, with a fresh JUCE 5.2 update, you can use CLion/CMake exporter in Projucer and start developing your audio application with CLion even faster!

Watch the demo.

Intentions: Invert if

Invert if

One very common refactoring pattern is to invert the condition in the if clause and flip the if-else blocks. This can help simplify complex code that uses multiple nested if statements.

Follow this pattern with CLion support now – the corresponding intention will invert the if clause for you.

Profiling: Valgrind Memcheck

Valgrind Memcheck

CLion now comes with the memory profiling on Linux and macOS platforms – Valgrind Memcheck integration was introduced in v2017.3. It lets you run targets with Valgrind Memcheck and then get the results in a special tab in the Run tool window. Users can run both regular targets and unit tests targets with Memcheck.

Learn more

Unit testing: Boost.Test


Boost.Test, the second most popular unit testing framework used by C++ developers on a regular basis, is now available in CLion along with Google Test and Catch/Catch 2. The support includes:

  • Special Boost.Test Run/Debug configurations
  • Results view in the built-in test runner
  • Ability to re-run all/one/all failed tests, export/import results
  • Ability to navigate to the test source code from the test results

UI: Run icons

Run icon

The left gutter in CLion is used to help with navigation through the code, VCS changes, and more. Now it also shows special run icons to Run, Debug or Run with Valgrind main functions and unit tests.

For unit tests, these icons also report the status of the tests: success or failure.

Learn more

Multiple Toolchains

The multiple toolchains support in v2017.3 means it is easier to set compiler configurations, different versions of CMake/compiler/debugger for different projects and configurations, and that there is a simplified switcher for toolchains on Windows. The new settings are as follows:

  • Configure Toolchains – then use them in CMake Profiles.
  • Select CMake Profile when selecting a configuration to Run or Debug.


In File | Settings | Build, Execution, Deployment | Toolchains you can now configure several toolchains, selecting various CMake executables, compilers, and debuggers. On Windows, create different toolchains for MinGW, Cygwin, and Microsoft Visual C++ compiler configurations.

Select from these toolchains later in CMake profiles to apply different toolchains to different configurations.

CMake profiles

CMake profiles

CMake profiles are created per project and can be used to easily switch between Debug/Release configurations, and to use different Toolchains in one project, etc.

Create CMake profiles in In File | Settings | Build, Execution, Deployment | CMake, set the build type, CMake options, environment, and other settings, select toolchains from the list of configured ones.

Toolchains compiler

Easy way to switch the compiler

To easily switch compilers on a project, or to use several different compilers for Running/Debugging different targets, use Toolchains. You can either rely on a compiler/Make detected by CMake or select a custom one.

Note, CMake options -DCMAKE_C_COMPILER and -DCMAKE_CXX_COMPILER take precedence over these compiler settings.

Build type switcher

Build type switcher

Select the necessary CMake Profile in the run configuration switcher on the toolbar. A typical case is Debug/Release build types configured via two different CMake Profiles.

The switcher is also available in the Run/Debug configuration switcher popup that opens via Shift+Alt+F10 for Run and Shift+Alt+F9 for Debug.

Color schemes

Color schemes

The color scheme settings for C/C++ were updated to distinguish function calls and function declarations. In In File | Settings | Editor | Color Scheme | C/C++ you can now find separate settings for these two options.

For example, you can make function declarations bold and keep function calls in regular font.

Other improvements

  • Debugger:
    • CLion now bundles GDB 8.0 with multiarch support
    • CLion now bundles LLDB 5.0
  • CMake 3.9 is now bundled into CLion
  • VCS improvements:
    • When switching between branches, the IDE preserves your workspace and automatically restores it when necessary.
    • When committing git patches from the IDE, the IDE reads the author and commit details provided by the git patches.
    • When using Tasks & Contexts, you can now shelve the changes related to your current task when you start a new task; unshelve the changes when you switch back.
    • And some more
  • Kotlin/Native, a brand new technology that compiles Kotlin directly to machine code, is now supported in CLion via plugins
2017.2 Jul 19


Clang-Tidy: modernize

Clang-Tidy on board

Clang-Tidy is a powerful code analysis tool that provides dozens of valuable checks and quick-fixes. Now you can benefit from it in CLion – it works as you type, and shows messages the same way as CLion’s own built-in code inspections. Clang-tidy quick-fixes are similarly available via Alt+Enter.

Cpp Core Guidelines

C++ Core Guidelines, and more

Clang-Tidy incorporates lots of valuable checks. Among them are C++ Core Guidelines checks (use -*,cppcoreguidelines-* to run only these), modernize C++ code checks (-*,modernize-*), and many others.

Clang-Tidy: settings

Configure the checks you need

Make the IDE run only the checks you really need. To configure this easily, go to C/C++ code inspections settings Settings/Preferences | Editor | Inspections | C/C++ | General | Clang-Tidy). Clang-Tidy command line format is used in the text field. The default configuration can be found here.

Besides, from a context menu you can disable individual checks or suppress the check for a particular line via // NOLINT.

Add your own checks

Clang-Tidy is easily extendable, with a convenient API for writing new checks. Add your custom checks to Clang-Tidy, provide a path to the Clang-Tidy binary in Settings/Preferences | Languages & Frameworks | C/C++ and get your checks immediately in CLion.

For custom checks, please, be sure you are using Clang-Tidy version 6.0.0+ or any other version, but with patches from JetBrains applied (patch D35349, patch D34404).

C++ Support

Code analysis correctness

Focusing on correctness, CLion 2017.2 improves its C++ code analysis across the board. For example:

  • Fixes for incorrect code analysis in cases when std::enable_if is used
  • Fixes for the issues with resolving STL containers with nested template type for GCC5/6
  • Proper support for va_* macros was added
  • Correct handling of functions that take parameter pack arguments and non-template arguments
Unused var quick-fix

Unused variable quick-fix

Even when variable is unused, constructor might still have some side effects. A new quick-fix was added to preserve non-trivial constructor call on unused variable.

C++ type casts

C++ cast operators

CLion’s intentions and quick-fixes in C++ code suggest C++ type casts (static_cast, dynamic_cast, reinterpret_cast, const_cast) instead of C-style casts.

Learn more

C++17 in the New Project wizard

C++17 in the New Project wizard

C++17 is now available in the list of standards in the New Project wizard. CLion will automatically add set(CMAKE_CXX_STANDARD 17) to the CMakeLists.txt generated for new projects.

PCH for Microsoft Visual C++ compiler

Precompiled headers are now supported for MSVC as well. Learn more


Force Step Into

Force Step Into

The Disassembly view is shown in CLion when sources are not available when debugging with GDB. To get into disassembly code, now you need to use a special action, Force Step Into (Shift+Alt+F7). The usual Step Into (F7) will simply skip all frames without sources.

Long arrays

Inspecting big arrays

To reduce timeouts during array evaluation while debugging, CLion uses a limit of 50 array elements shown by default. If you need elements with big indexes and clicking expand is not an option, then simply increase the value cidr.debugger.value.maxChildren in the Registry.

Keep in mind that this may lead to increased timeouts as well.

GDB driver fixes

CLion 2017.2 fixes several annoying issues with GDB driver:

  • Command time out when trying to attach to a non-existent local process
  • Incorrectly escaped backslashes in program arguments on Windows

Performance improvements

Indexing times were improved in some cases. And after optimizing the parsing of the compiler predefined macros in CLion, some performance improvement during the reindexing was achieved as well. Besides, in some cases it’s just about giving users more control:

Cancelable go to actions

Cancelable asynchronous Go to actions

Go to subclass and Go to overridden functions actions may take significant time as they build a list of available options to navigate to. To improve IDE performance and responsiveness, we’ve made it possible to cancel these navigation actions – simply click to the area out of the navigation popup window and it’s done!

Cancelable CMake reload

Cancelable CMake reload

To save time, it’s now possible to cancel CMake reload in order to introduce additional changes or just to postpone this time-consuming operation. To that end we’ve added a Stop button to the CMake tool window.

To distinguish cancelled and finished CMake runs, CLion now displays [Finished] in every output tab for each CMake configuration being reloaded and finished.

Find in path UI

The Find in Path popup introduced in 2017.1 has received some UI enhancements.

Find in Path: left gutter

Left gutter in preview

The Preview panel now has a full-featured left-side gutter with navigation icons, and markers for local changes.

Find in Path: Merged results

Merged results

For your convenience, search results from the same lines are now merged together in the Preview panel.


VCS: Git Revert


Git Revert is now available in the Git Log view and works for any number of selected commits.

VCS: Reword


To change the commit message for a commit that has not been pushed yet, use the new Reword action.

Commit messages settings

Commit Dialog settings

To keep the commit messages easy to read and expressive, take care of their formatting. Updated settings allow you to control blank lines between subject and body, maximum text length, and check spelling. They are located under Version Control | Commit Dialog.

VCS: quick-fixes

Quick-fixes for commit messages

CLion now offers quick-fixes for commit messages, such as reformat or wrap lines.

Other improvements

  • CMake 3.8 is now bundled into CLion.
  • Google Test Run/Debug configurations are generated automatically for targets linked with gmock (similar to what was previously done for gtest).
  • On Windows displays, CLion gets its own scale factor and the UI is scaled accordingly.
2017.1 Mar 29

Modern C++


CLion 2017.1 delivers support for the following C++14 features:

  • auto return type,
  • generic lambdas,
  • variable templates, and
  • generalized lambda captures.

See the full list of supported features per standard in CLion’s online documentation.

C++17 support


As the C++17 standard is just around the corner and the upcoming features are being finalized, CLion starts supporting C++17 with nested namespaces.

Make auto intention

Make auto intention

For the sake of code readability and accuracy, CLion now suggests to modernize your C++ code by converting variable type to auto.

As this feature should be used carefully across your code base, it’s implemented as a non-intrusive intention. Use it as you see fit.

Code analysis

General improvements

We continue to improve CLion’s parser and code analysis to make it even more accurate:

  • Hidden functions from the base class are no longer suggested in completion
  • Fixes for various false positives, for example in case of decltype(auto) in trailing return
  • Correct calculation for value category (that fixes many false 'expression is not assignable,' 'expression must be lvalue,' and 'expression must be rvalue' warnings)

Precompiled headers

Precompiled headers

CLion now locates the precompiled headers and headers included via -include option, in order to correctly resolve symbols from such files and correctly highlight the code, navigate through it, perform code refactorings, etc.

Learn more

Disassembly view for debugger

Disassembly view

While debugging with GDB, you can now step into disassembly code when the sources are not available. Read the assembly, which is properly highlighted in the editor, and step through it to investigate the problem.



Catch is a cross-platform unit testing framework for C++ known for its easy starting process and convenient and flexible test cases. Now you can use Catch with CLion and benefit from completion and the built-in test runner.

Microsoft Visual C++ compiler

Experimental support for the Microsoft Visual C++ compiler is here. Check it out to avoid difficulties with MinGW/MinGW-w64 or Cygwin configuration, and especially if you use Microsoft Visual C++ as a compiler for your cross-platform C++ project.


Current support covers:

  • Auto-detection and support for C++ compiler from Visual Studio 2013, 2015 and 2017
  • Support for projects using CMake with NMake generator
  • Settings to configure architecture, platform, etc.
  • Navigation through the compiler errors in the Messages tool window

To switch on the support, use clion.enable.msvc option in the Registry.

Project model improvements

Project model is now more user-friendly:

  • For existing CMake projects, the project name in CLion is taken from CMake’s PROJECT_NAME on first opening
  • Escaped symbols in CMake files are now handled correctly
  • Obsolete not-modified run configurations, and run configurations for deleted targets, are now removed automatically

Find in Path

Run a text search across the whole project or any selected scope with Find in Path, now in a compact and more convenient popup window with immediate preview.

Find in path


Make auto intention

Log Viewer

Refine your search through the Git and Mercurial logs in the Log Viewer with these new options:

  • Ability to use regular expressions
  • Ability to match / ignore case

Configure which information to display in the log viewer to make it more compact or more detailed (for example, show / hide tag names).


Branches popup

The Branches popup has been redesigned and can now mark important branches as Favorites.

This gives you the ability to filter the branches and show only favorites in the corresponding popup.



Several important enhancements were added to the Swift plugin for CLion:

  • Create new Swift projects with ease using the new project template
  • Check possible issues in your code in Swift with SourceKit inspections and intentions available in the plugin
  • When using a type which doesn't exist yet, create it from usage via Alt+Enter

Other improvements

  • Zero latency typing has proved to remove many typing lags in IntelliJ-based IDEs and is now enabled by default
  • CMake 3.7 was bundled into CLion
  • Fixes for Dvorak layout in macOS, as well as Korean, Chinese and Japanese keyboard layouts on macOS are included
  • Settings Repository plugin is finally bundled into CLion
  • Go plugin was updated and now correlates with GoLand functionality