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.
- Experimental support for C++20 modules.
- Improved C++ support:
[[nodiscard("should have a reason")]], and more.
- Renaming Unreal Engine entities with Core Redirects and new Blueprints-specific inlay hints.
- Clang-format as an alternative code formatter.
- Improved clang-tidy integration.
- New actions to improve the readability of conditions.
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.
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!
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 packdirectives and uses them when calculating object size and alignment.
- Parameter info and inlay hints in
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")]],
__sync*GCC builtins, and the GNU style for specifying calling conventions in function declarations.
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
UPROPERTY, and now it also works for
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.
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.
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.
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.
We’ve updated the bundled clang-tidy binary to Clang 15, bringing new checks.
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.
There are two useful new additions to help you make conditions more readable:
- A context action that replaces
||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.
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.
Your ReSharper C++ team
The Drive to Develop
Subscribe to Blog updates
Thanks, we've got you!
ReSharper C++ 2023.2: Safe Delete Refactoring, AI Assistant, New C++23 and C++20 Features
New release brings the Safe Delete refactoring, support for several new C++20 and C++23 features, ReSharper’s AI Assistant, and more.
ReSharper C++ 2023.1: Call Tracking, Macro Expansion Preview, and Support for C++23 Features
ReSharper C++ 2023.1 brings updates for C++20 and C++23 features, and also introduces Call tracking for incoming calls and macro substitution previews in tooltips and Quick Documentation popups.
C++20 Modules Come to ReSharper C++
We've implemented support for both of the main ways to introduce modules into your codebase: named modules and header units.