CLion 2020.1

Aggiunge diversi miglioramenti in molte funzionalità dell'IDE.
Aprile 15, 2020
Nuova versione

Funzionalità

Embedded Development

  • IAR Toolchain - 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.
  • PlatformIO - 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:
    • Adds the PlatformIO project type to the New Project wizard.
    • Generates the corresponding PlatformIO CMake-based project.
    • Automatically creates configurations for debug and upload.
    • Allows for debugging with the PIO Unified Debugger from CLion right on chip.

CUDA support

  • Code parsing and code assistance - 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.
  • New Project wizard - 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.
  • File extensions and CMake targets - 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 cuda_add_executable and cuda_add_library commands).

Development on Windows

  • Clang-cl - This release now makes 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.
  • Debugger for the Visual Studio C++ toolchain - 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.

Run and Debug configurations

  • Custom targets for remote and embedded GDB - 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.
  • Support for macros and path variables in Run/Debug configurations - 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:
    • The build directory for the current CMake run configuration.
    • The generation directory for the current CMake run configuration.
    • The project file directory.
  • Input redirection - 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:
    • A relative path (CLion will prepend with the Working directory path).
    • An absolute path (will be remapped for remote configurations).
    • Or macros (like FilePrompt).

Clang tools

  • DFA on Clangd - 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.
  • Clangd-only completion - 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.
  • ClangFormat - 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.
  • Clang-Tidy - 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.

Formatter and code folding

  • New naming settings - Struct member fields and class member fields now have separate naming settings. Check them out in Settings | Editor | Code Style | C/C++ | Naming Convention.
  • Code folding - #pragma region and #pragma endregion can be used in CLion for code folding.
  • Refactorings update - 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.

Editor

  • Quick Documentation - A universal tool to preview documentation and get information about function signature, inferred types, and macro replacement – is now available on mouseover.
  • JetBrains Mono and IntelliJ Light - 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.
  • Split terminal sessions - 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.

Version Control

  • New Commit tool window - 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.
  • Interactively Rebase from Here - An updated, truly interactive dialog makes it possible to:
    • Select an action you want to perform on each commit in your branch.
    • Check a graph showing which actions have been applied.
    • View the commit details.
    • See a diff, and review or reset the changes if necessary.
  • Install Git from the IDE - 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.

Rust plugin update

  • 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, this release only enabled this feature for types with a limited number of aliases.
  • Other enhancements include highlighting for unused local variables, fixes in cfg attribute support, and the new Lift return inspection.

Other improvements

  • All remote configurations now benefit from using the common and unified SSH Configurations UI. No matter where a new SSH configuration originates (be that remote toolchains settings or Remote GDB server configurations), it will have an entry in Settings | Tools | SSH Configurations.
  • If you want to focus solely on your source code, you can select a new Zen mode, which combines Distraction-Free Mode with Full Screen Mode. To enable it, use View | Appearance | Enter Zen Mode.
IAR Toolchain

CLion

Un IDE multipiattaforma per C e C++.

CLion è disponibile anche in:

Hai una domanda?

Chatta live con i nostri specialisti di gestione delle licenze di JetBrains ora.