2018.2 (Jul 25)
Clangd-based language engine
CLion 2018.2 introduces an experimental clangd-based language engine for showing code errors and warnings in the CLion editor, which works alongside CLion’s own language engine. It’s enabled by default on all platforms. Note that the clangd engine is used for code analysis only and doesn’t affect the rest of code insight features like completion or refactoring.
Argument selection defects inspection
Is it possible to detect situations when the arguments of the same type are passed in the wrong order? It is if argument and parameter names are meaningful! Welcome a new inspection in CLion to alert you of this: argument selection defects.
Note, it works on top of the new clangd-based language engine, so you have to turn it on to enable the new inspection.
Learn more about the algorithm used
New Project Models
New Gradle C++ projects can now be opened in CLion (see the new C++ plugins announcement). Use the build.gradle file or the directory containing this file to open a Gradle project in CLion. All IDE capabilities, including full code insight, are available for such projects in CLion.
Compilation Database is a set of all compile options used to build the files in a project. If you manage to get one from your project (via your build system's options or separate tools like bear and intercept-build), you can now use the resulting json file to open your project in CLion. Code insight does work, though it’s not yet possible to build, run, or debug such projects.
Included files as project files
You no longer need to list header files from your project root directory directly in CMake to get full code insight for such files in CLion. If you include the header or source file into any project file, CLion will automatically treat it as a project file as well, which means full code insight will work in there!
When configuring an external tool in CLion, you can now use CMake-specific macros, which provide information about the current CMake run configuration: build directory, build type name, program arguments, or target name.
If you build your project with the
-fsanitize option, CLion will visualize the sanitizers’ output in a “Sanitizer” tab in the run tool window. Use it to review the list of errors, navigate to sources in the editor, and do much more. Enjoy support for ASAN, TSAN, MSAN, and UBSAN in CLion.
Valgrind Memcheck export/import
To keep an eye on your project’s memory issues and track the progress, you can now export Valgrind Memcheck results into XML files. Reimport them back with ease, whenever you need.
Recompile a single file
To speed up your development cycles, verify local changes quickly by recompiling a single
file. Use CLion’s new action Run | Recompile (Shift+Ctrl+F9).
For now this only works for CMake (it calls the CMake target for the corresponding file, instead of a direct compiler call) and compilation database projects (it calls the compilation command from the json file).
Database tools and SQL
Version 2018.2 bundles the Database Tools and SQL plugin, which adds DataGrip’s
functionality to CLion. This allows you to work with many known databases like MySQL,
PostgreSQL, Oracle, and others.
Explore the content of a database, read and modify data, execute queries, and get full code
insight for SQL too.
Making the editor more responsive is currently one of our top priorities. CLion 2018.2 comes with the following improvements:
- Lexer-only indentation processor allows CLion to format your code based on lexer information. Read
- Version 2018.2 brings fixes for UI freezes in:
- completion use cases,
- Search Everywhere,
- navigation to Related symbol,
- and more.
Among other enhancements you’ll find:
- Bundled LLDB 6.0 and CMake 3.12.
- A host of fixes for LLDB and GDB.
- Support for WSL background processes (starting with Windows 10 v1803).
- MacBook Touch Bar support (read more).
- Improved VCS support (read more).