What’s New in ReSharper C++ 2024.1

ReSharper C++ 2024.1 improves C++20 modules support and implements outgoing calls in Call Tracking. Coding assistance enhancements include improvements to the Change Signature refactoring, updated documentation comments support, and more. For Unreal Engine developers, ReSharper C++ 2024.1 offers support for the Slate UI framework and asset path completion in C++ code.

Download

Free 30-day trial available

C++20 modules support

Thanks to the updated process of module discovery, ReSharper C++ now supports internal partition units, which are module partition units that do not contribute to the external interface of a module. In other words, they are module partitions without an associated export module declaration.

We’ve reworked the internal representation of exported C++20 modules to facilitate transitive references to entities imported from other modules. Previously, these entities were reexported from the module that imported them. We expect this change to significantly reduce the footprint of exported modules and enhance performance in projects utilizing C++20 modules.

Unreal Engine

ReSharper C++ 2024.1 introduces support for Unreal Engine’s Slate UI framework. You can rely on ReSharper’s code formatter and typing assistance to format your Slate code according to Unreal Engine’s conventions. Features, like Go to declaration, Find Usages, and Rename, have also been updated to understand Slate’s declarative syntax.

ReSharper C++’s integration with Blueprint functionality continues, with support for adding core redirects when renaming a UENUM instance, as well as completion of asset paths for resource names in C++ code.

HLSL interfaces used for dynamic shader linkage are now supported in shader code.

If you’re interested in a stand-alone cross-platform IDE for Unreal Engine development, consider Rider. The Unreal Engine support in Rider and ReSharper C++ is aligned, and you can expect the same improvements in the Rider 2024.1 update.

Outgoing calls in Call Tracking

ReSharper’s Call Tracking now supports navigation through outgoing C++ call chains, in addition to the existing support for tracking incoming calls. To explore outgoing calls, place the caret at any function and select Inspect | Outgoing calls from the context menu. Alternatively, you can press Ctrl+Shift+Alt+A to invoke it from the Inspect This menu.

Change Signature improvements

With Change Signature, you can now easily change the type of a function parameter between a pointer, a reference, or a value type. ReSharper will automatically update parameter usages within the function body and adjust function arguments at the function call sites, adding dereferencing or address-of operators where required.

When Change Signature is invoked on a function that has potential usages in dependent code, the refactoring now lets you verify the changes and confirm which usages need to be updated.

You can also now specify default arguments for new function parameters added using Change Signature.

Other notable updates to Change Signature include:

  • Improved handling of variadic function templates.
  • Correct updating of function arguments for call sites inside macro calls.
  • Change Signature now preserves array types and the int type specifier in unsigned int types.

Documentation comments

You can now customize the style of generated documentation comments without the need to edit a live template. To configure the style of documentation comments, go to ReSharper’s Settings | Code editing | C++ | Code generation.

JetBrains Grazie is ReSharper’s new built-in grammar and spelling checker, introduced in ReSharper 2023.3. In the 2024.1 release, Grazie-powered grammar inspections are also available inside C++ documentation comments.

The Change Signature refactoring now keeps @param commands in sync with the list of function parameters. This refactoring deletes @param commands for removed parameters, adds commands for new parameters, and rearranges existing commands to match the updated order of included parameters.

Code analysis

Based on the latest results from the extensive test suite for C++ refactoring tools maintained by Richard Thomson, ReSharper C++ continues to outperform other tools by passing the most test cases. As a part of our constant work on improving the quality of ReSharper’s suggestions, we’ve addressed several issues identified by Richard’s test suite in ReSharper C++ 2024.1. For example, the Create constructor from usage quick-fix now adds a default constructor when needed.

ReSharper C++ 2024.1 now suggests removing redundant idiomatic zero initializers in aggregate initialization. Several new inspections find various issues with static data members, such as redundant inline specifiers on static constexpr data members.

Code cleanup adds new items to remove redundant accessibility specifiers and to make classes without inheritors final. Apply ‘auto’ style now handles global variables and class members in addition to local variables.

If you want to suppress an inspection in a specific scope, previously, you could use ReSharper-specific // ReSharper disable comments. ReSharper C++ 2024.1 additionally recognizes the NOLINT, NOLINTNEXTLINE, and NOLINTBEGIN ... NOLINTEND comments that clang-tidy uses.

Code formatting

ReSharper C++ 2024.1 introduces several new formatting options:

  • Break line after goto labels and Indent goto labels enhance the formatting of labeled statements.
  • Settings that control wrapping inside enumerations under Arrangement of enumerations.
  • Empty braces formatting now includes the Do not change option.

When using a .clang-format config, ReSharper’s formatter now respects the DisableFormat and IndentAccessModifiers settings. The GNU built-in clang-format style is now also supported.

Take a look at the What's New in ReSharper page to learn about all of the other changes introduced in this release.

Download

Free 30-day trial available