News Releases

ReSharper C++ 2022.3: C++20 Modules and Clang-Format Integration

ReSharper C++ 2022.3 is now available!
Update to the latest version, or start a free 30-day trial today! Download the build from our website or via the Toolbox App.

ReSharper C++ 2022.3


Check out the highlights and visit our What’s New page for more details about these and other improvements:

DOWNLOAD RESHARPER C++

C++20 modules

ReSharper C++ 2022.3 introduces experimental support for C++20 modules. We’ve updated the language engine and many of the ReSharper C++ features to work with the new compilation model, supporting both named modules and header units.

C++20 modules: Code completion

ReSharper C++ now properly handles new syntax and warns you about unresolved module names or paths in import declarations. There’s also support for modules in all basic navigation features, a new built-in Module interface unit file template, as well as other enhancements.

Check out this blog post for details about supported features and known limitations. If you’d like to experiment with this long-awaited C++20 feature on other platforms, give it a try in CLion, which now includes support for modules, too!

C++ support

Besides our ongoing work on C++20 modules, we continue to improve ReSharper’s support for other language features. Here are the highlights for this release:

  • ReSharper C++ now understands #pragma pack directives and uses them when calculating object size and alignment.
  • #pragma pack

  • Parameter info and inlay hints in emplace-like and make-like calls are now available for any function that implies a constructor call according to the declaration of the function.
  • Improved compile-time evaluation now correctly handles various forms of object initialization, including the evaluation of constructors of any kind and designated initialization.
  • Support for C++20’s [[nodiscard("should have a reason")]], __atomic* and __sync* GCC builtins, and the GNU style for specifying calling conventions in function declarations.

Unreal Engine

If an asset is affected by renaming a symbol, Unreal Engine will no longer recognize it. To prevent data loss, ReSharper C++ suggests adding a Core Redirect when you perform the Rename refactoring. If you accept, it will update the corresponding .ini file for you.

The Add Core Redirect option was already available for UCLASS and UPROPERTY, and now it also works for UFUNCTION, USTRUCT, and UENUM.

Add Core Redirect

We hope you found Blueprints-specific inlay hints introduced in ReSharper C++ 2022.2 helpful. Based on community feedback, we’ve added one more type of Blueprints hint: you can now quickly check how many blueprints use a function marked with the BlueprintCallable specifier and get a list of all usages from the hint’s context menu.

Hints for BlueprintCallable

This release also includes miscellaneous updates to support the latest Unreal Engine 5.1 version.

ReSharper C++ no longer offers unwanted entities from system headers and shader files in auto-import suggestions. You can enable system header suggestions in Options | Code Editing | C++ | Unreal Engine.

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

Code formatting

ReSharper C++ 2022.3 introduces seamless integration with clang-format as an alternative code formatter. You can now switch between ReSharper’s formatting engine and the built-in or a custom clang-format binary for formatting files.

Clang-format

ReSharper’s own formatter has also received a few updates. We’ve added new options for managing spaces before and after ellipses (...) in parameter packs, aligning enumerator initializers in columns, and a bunch of formatting options for blank lines.

Clang-tidy updates

We’ve updated the bundled clang-tidy binary to Clang 15, bringing new checks.
Clang 15

This release also brings several improvements for clang-tidy integration:

  • In C files, clang-tidy now adjusts its checks according to the C language standard set in the project settings.
  • When using your own clang-tidy binary, you can now specify a path to the binary relative to the solution folder.
  • ReSharper’s own inspections now have priority when they share the same range with clang-tidy checks.

Coding assistance

There are two useful new additions to help you make conditions more readable:

  • A context action that replaces && with || and vice versa inside boolean expressions, following De Morgan’s laws.
  • An inspection with a quick-fix that simplifies negated comparison expressions.

ReSharper C++ now also shows the origin of a function in the parameter info and other tooltips, identifying whether a function is implicitly generated or a compiler intrinsic.

Function origin

Those are all the highlights for today! The full list of fixed issues is available in our issue tracker. More changes are coming from the ReSharper platform. For example, ReSharper will now alert you about vulnerable dependencies associated with the use of NuGet packages.

We’re always keen to receive your feedback about new features and updates! Please give ReSharper C++ 2022.3 a try and let us know what you think.

DOWNLOAD RESHARPER C++

Your ReSharper C++ team
JetBrains
The Drive to Develop

image description