Please welcome the new release of your favorite cross-platform C/C++ IDE – CLion 2017.2! Focusing on C++ correctness and performance improvements, it also brings Clang-Tidy integration to expand the number of code analysis checks, a better way to get disassembly view, and lots of bug fixes and other improvements.
Read on for details and get a free 30-day trial to evaluate all the new features and enhancements:
Today we start CLion 2017.2.2 Early Access Program, build 172.3968.3 is available here. Please, note that this EAP build requires an active subscription (or you can start a 30-day evaluation period).
Clang-Tidy integration: disable individual checks and other improvements
CLion 2017.2 brought Clang-Tidy integration, that expands the list of CLion’s checks and helps you ensure better code quality. We’ve received a lot of useful feedback and today are happy to address several important issues:
Now you can use your own Clang-Tidy instead of one bundled into CLion. To do so provide a path to the Clang-Tidy binary in Settings/Preferences | Languages & Frameworks | C/C++:
The main benefit of this change is that you can now checkout the LLVM master repository, add your own checks to the Clang-Tidy and get them instantly in CLion!
Please, be sure you are using Clang-Tidy version 6.0.0 and more (or any other version, but with this and this patches applied).
You can now disable individual Clang-Tidy checks from the CLion context menu:
This will update the list of enabled/disable checks in Settings/Preferences | Editor | Inspections | C/C++ | General | Clang-Tidy:
In this context menu you can also find an option to suppress Clang-Tidy check for a particular line via // NOLINT.
General refactoring strategies, e.g. duplicate & reduce, parallel change
And all of it using and explaining CLion’s refactoring capabilities
You can also clone a demo project from GitHub. If you plan to follow the webinar in CLion, go to VCS | Checkout from Version Control | GitHub and use this link: https://github.com/arnemertz/commandline-videostore-cpp.git
The recording of our July 11th webinar with Diego Rodriguez-Losada and Luis Martinez de Bartolome, Developing C/C++ projects with CLion IDE and Conan C/C++ package manager, is now available on JetBrainsTV YouTube channel.
In this webinar we’ve discussed the process of developing large C/C++ projects using the package modularization and reuse offered by Conan package manager, and the power and convenience of the CLion IDE, using the CMake build system.
This webinar will give an introduction to finding code smells and refactoring them towards cleaner code.
It will show how to break down a refactoring into small steps that are easy to perform safely with the help of CLion’s powerful automated refactorings aides or manually, if needed. In addition, it will touch on the most important strategies we can use to stay in control of the refactoring process.
Join us Thursday, August 17th, 4pm – 5pm GMT (6pm – 7pm CEST, 9am – 10am PDT).
Arne has been an enterprise C++ developer for almost a decade. Due to his involvement in large legacy projects in the insurance market, he has developed an interest in software craftmanship topics. Since the beginning of 2015 he blogs frequently about modern C++, clean code and related topics. Arne works at Zühlke Engineering, currently dipping his toes into the world of C++ on embedded devices.
We are approaching the final steps towards the CLion 2017.2 release and today we are glad to announce CLion 2017.2 Release Candidate 2 (build 172.3317.49). Give it a try, and if you find any bug at all, please file an issue in our tracker.
Files that do not belong to any CMake target are considered as not included into the project. For CLion it means that code insight features should be limited in such files, for example refactorings should not be performed. To identify these files with ease CLion marks them as greyed out in the project view. Now you can also easily identify such files in the editor, thanks to the file-wide notifications.
By the way, when you create new C++ class or C/C++ source or header file CLion suggests to add a new file to CMake target and suggests most probable options to select from. Use this feature to get all your new files included into CMake targets.
Besides, several performance improvements (in indexing) were implemented in this build. Release notes are available by the link.
Please note that to use CLion 2017.2 RC2 you need to have an active subscription (or start a 30-day evaluation period).
CLion 2017.2 release is coming closer and today we are glad to announce Release Candidate build (172.3317.14).
C++ cast operators
CLion is able to indicate situations when user is missing a type cast. As a quick-fix (Alt+Enter), CLion suggested a C style cast previously. Now CLion suggests C++ type casts: static_cast, dynamic_cast, reinterpret_cast, const_cast:
If there is no single valid C++ style cast operator, the C style cast will be used. And if you want CLion to permanently use C style cast operators, simply switch off the setting in Settings/Preferences | Editor | Code Style | C/C++ | Code Generation | C++:
Besides, a couple of false positives code analysis checks were fixed: CPP-989 and CPP-3111.
You are welcome to download and try the RC build (no license is required). If you find any bug at all, please, report to our issue tracker.
Check the new CLion 2017.2 EAP build (172.3198.18). This build includes a couple of important improvements and enhancements to the currently available features.
Force Step Into
CLion 2017.1 brought disassembly view for debugger. It allows stepping into disassembly code when the sources are not available, while debugging with GDB.
However, seems, that quite often, when pressing Step Into F7, users don’t expect disassembly code, but rather just skipping all the frames without the sources. That’s why we’ve moved the functionality to the Force Step Into Shift+Alt+F7. That means that from now on to get to the disassembly code you need to use Force Step Into, while usual Step Into will jump to the closest frame with sources:
CLion 2017.2 EAP started with the Clang-Tidy integration. Clang-Tidy warnings are shown the same way as CLion’s own built-in code inspections. Similarly you can use Alt+Enter to apply Clang-Tidy quick-fixes where available.
This EAP build fixes some issues related to this integration:
CLion used to continue highlighting the code and showing the warning for a couple of seconds after the quick-fix was applied. This is partially fixed now. The problem only left for the cases when the fix and the warning are located in various lines, or when the user calls Undo for a quick-fix.
We continue our work on performance improvements in CLion. This EAP build brings fixes for laggy Enter and Backspace handle on some projects (when, for example, cursor enters a new block, moves to a new line and causes the code indent).
C++17 is just around the corner. Besides, CLion now includes bundled CMake 3.8, that supports set(CMAKE_CXX_STANDARD 17) command to set C++17 for the project. Therefore we’ve added C++17 option to the list of standards in the New Project… wizard:
The corresponding set command will be added to CMakeLists.txt generated for your new project in this case.