CLion 2021.3

ツールチェーンのサポートが向上し、柔軟性が高まり、カスタマイズが容易になりました。
12月 2, 2021
新バージョン

機能

  • Toolchains - This release makes toolchains more flexible, easier to configure and customize:
    • Docker Toolchain - Instead of using Remote toolchain for Docker in CLion, you can now use the native Docker toolchain. It avoids redundant source code synchronization, as the project folder is simply mounted to the container. CLion also bundles the Docker plugin, which brings the Services tool window and many docker-specific actions to the IDE.
    • Custom Compiler - Added the ability to describe all the necessary information about the compiler to CLion and work with it as if it were natively supported.
    • Initialize toolchain environment via script - In some cases the environment in which the compiler runs is initialized via script. It can initialize compiler environmental variables, customize the PATH variable, and more.
    • Bundled MinGW on Microsoft Windows - CLion now bundles the MinGW toolchain on Windows for quick setup, which you can rely on if you don’t have any other options installed on your machine. The exact version bundled is MinGW-w64 9.0 with languages=c,c++, posix threads, and sehcode exceptions. Another improvement for MinGW users is a bundled 64 bit GDB v10.2 with Python support.
    • System toolchain on Windows - A new System toolchain on Windows, similar to the same toolchain type on Linux and Apple macOS, allows configuring CMake, compiler, and debugger executables without selecting a predefined environment (like MinGW, Cygwin, Microsoft Windows Subsystem for Linux (WSL), or Microsoft Visual Studio). This might be used for the ARM toolchain or other embedded toolchains on Windows.
  • CMake
    • CMake generators - A new UI for setting the CMake generator has been added to the CMake Profile settings page. Users can use the default value for the toolchain selected or set any generator from the predefined list. When the UI field is used, CMake options on the same page are updated automatically and vice versa.
    • Ninja generator - CLion 2021.3 comes with Ninja v1.10.2 bundled. For local toolchains (i.e. excluding Remote, Docker, WSL and CMake v3.20 and higher, Ninja is now the default generator for newly created projects or projects opened in CLion for the first time.
    • CMake update - CLion now bundles CMake 3.21.1. CMake File API is used by default to query project information in CLion for CMake v3.20 and higher. CMake Presets v3 are now supported.
  • Other project models
    • Makefile - Use the new Build directory option in Settings | Build, Execution, Deployment | Makefile to configure the directory where all make tasks are executed when the Makefile project is loaded in CLion. The configured directory is passed via -C option to the make call. Folders like autom4te.cache in the build directory are marked by CLion as excluded.
    • Gradle - While it’s still possible to use the Gradle project model for C++ projects in CLion, both Gradle and Gradle Native plugins in CLion are now unbundled. You can install them via Settings | Plugins.
  • Debugger enhancements
    • Improved types rendering - Heavily templated standard library types, or types with global and obvious namespace specifiers, can produce long entries in the variables view during debugging. To improve the debugging experience, CLion now performs some additional processing to render types in the variables view in a more readable and friendlier way:
      • Strip auxiliary namespaces, global and function scope specifiers, and standard library ABI version namespaces.
      • Simplify standard library types by replacing standard library types with more readable aliases.
      • You can also remove types completely from the presentation. This can help focus on the variable values.
    • Improved frames view - In the frames view in the debugger, in addition to type rendering improvements, CLion now improves functions presentation:
      • Removes return type, if any.
      • Hides function parameters.
      • Hides template arguments of enclosing types and the function itself, if any.
      • Renders the name of the function in bold to be easily distinguished from namespaces and enclosing types.
      • Can add the Module name to show in which binary the code is being executed at any moment.
      • Shows thread ID given by the OS on thread start in the thread list along with the thread name.
    • View as Array for pointers - A new View as Array… action is now available for any pointer variable and adds a watchpoint that renders a pointer value as array. The action is available in the context menu in the variables view. All you need to do is specify the size of the array.
    • Customizable debugger presentation - To control the presentation of the types, variables, and frames in the debugger, use the new settings in Settings | Build, Execution, Deployment | Debugger | Data Views | C/C++ (or just Data Views, without the separate C/C++ section if all other languages debuggers are disabled for you in CLion). Alternatively, you can control the presentation from the context menu right in the Debug tool window.
    • More convenient Evaluate Expression - As part of the ongoing debugger UI redesign, Evaluate expression is now integrated right in the Debug tool window. This makes it more discoverable and easy to use.
    • Parallel Stacks view - When debugging multithreaded applications, you have to track multiple threads at the same time. The new Parallel Stacks view has been implemented as a separate tab in the Debug tool window and shows thread call stack information for all the threads. It allows checking the call paths and execution points of all running threads.
    • Enhanced Hex view - Hex view for numeric variables has been improved and is no longer an experimental feature in CLion. Enable it in Settings | Build, Execution, Deployment | Debugger | Data Views | C/C++ or in the context menu in the variables view.
    • LLDB update - CLion now comes bundled with LLDB v13.
  • RTOS thread views
    • FreeRTOS thread view - FreeRTOS thread view has been expanded by adding objects and heap views:
      • The Task table shows a list of tasks with status information.
      • The Queue table shows currently active queues, semaphores, and mutexes.
      • The Timer table lists the software timers.
      • The Heap Usage table shows the current heap usage and memory block allocation.
    • Zephyr RTOS thread view - Zephyr RTOS is now supported. To enable the tasks view, similar to the one available for FreeRTOS, use Settings | Build, Execution, Deployment | Embedded Development | RTOS Integration and select Zephyr there.
  • Type hints
    • This release adds type hints for deduced types to increase code readability.
    • The new hints help with types for auto variables, in structured bindings, and for lambda return types.
    • You can disable or enable specific type hints in Settings | Editor | Inlay Hints | C/C++ or right from the hint’s context menu.
    • If the type hint includes the template instantiation, the template arguments can be collapsed by simply clicking on the angle brackets.
    • Ctrl+Click allows you to navigate to the declaration of the type you clicked on.
  • Enhanced Structure View - When exploring the structure of the file in the Structure tool window (Alt+7) or in the Structure pop-up (Ctrl+F12), you can now distinguish functions with the same names more easily, as CLion now shows qualified names for the member functions there.
  • Static Analysis
    • Clang tools update - LLVM tools in CLion have been upgraded to v14.0.0. This improves the accuracy of the Clangd-based language engine and updates bundled Clang-Tidy and ClangFormat executables. For Clang-Tidy, this also means there are a few new checks you’ll be notified about when CLion is first launched after the update.
    • More MISRA checks - New MISRA checks have been added to CLion’s built-in analyzer:
      • A function identifier shall either be used to call the function or it shall be preceded by &.
      • The loop-counter shall be modified by the value that stays constant for the duration of the loop.
      • There should be exactly one loop-counter in the for loop.
      • The loop-counter shall not be modified within condition or statement, and others.
    • Call-context sensitive analysis - CLion’s data flow analysis now treats different calls differently, and so has become more accurate. This specifically means that:
      • CLion analyzes each function for each call site separately.
      • Parameters and return values for different call sites are analyzed separately.
    • More powerful Lifetime analysis - CLion’s lifetime analysis (based on Herb Sutter’s Lifetime Safety proposal) has been enhanced and it can now capture cases like dangling iterator and modified owner (as owners passed by non-const reference are assumed to be modified).
  • VCS
    • Sometimes, you may have several commits that are ready to ship while others are still a work in progress. In such cases, you may want to push only the ones you are confident about.
    • The new Push All up to Here action allows you to push commits up to the one you have selected in the Log tab of the Git tool window.
  • Other enhancements
    • CLion’s auto import now uses "" instead of <> for header files belonging to the project. This default behavior can be changed by turning off Settings | Editor | General | Auto Import | C/C++ | Auto import local files with quotes.
    • To improve CLion performance for projects on WSL, the Clangd-based language engine is now run directly on WSL in such cases.
Docker Toolchain

CLion

CとC++のクロスプラットフォームアプリ開発用IDE

CLionは、次の製品にも含まれています。

ご質問がありますか?

今すぐ JetBrains ライセンススペシャリストとライブ チャット