Early Access Program

ReSharper C++ 2020.2 EAP: Updates to Unreal Engine Support, Navigation Enhancements, and More

The second of our Early Access Program builds for ReSharper C++ 2020.2 is now available!

In this post, we’ll go through updates to Unreal Engine support, improved search and navigation features, and more. Read on for details:

  • Unreal Engine: smarter auto-include and header completion, better alignment with UE guidelines, and common acronyms in the built-in dictionary.
  • Navigation and Search: an option to hide preprocessor directives in File Structure, inheritance searches for CLR entities in C++/CLI, and Go to declaration for unresolved identifiers.
  • Modernize your C++ code: an inspection and a quick-fix to replace std::pair with a structured binding declaration.

Download the new EAP build from our website or via the Toolbox App.

DOWNLOAD RESHARPER C++ 2020.2 EAP

Unreal Engine

This EAP build includes several updates to inspection severity to be more specific to the Unreal Engine:

  • We’ve disabled the “Const-qualified parameter in a function declaration” inspection since the const qualifier should be added simultaneously to parameters of function declaration and definition.
  • We’ve disabled the “Class can be final” inspection for USTRUCT, UINTERFACE, and IInterface since it produces an invalid result and leads to Unreal Header Tool and build errors.
  • We’ve increased the severity of “Inconsistent UE4 naming” to error for USTRUCT since violations of the naming rules lead to the Unreal Header Tool and build error: the struct name must start with F.

Inconsistent UE4 naming for USTRUCT

You’ll no longer have to see the naming warning about common acronyms and manually add them to the known list, because we’ve supplemented the ReSharper C++ bundled dictionary with a long list of common game acronyms and abbreviations.

After updating Visual Studio, you can sometimes see errors caused by unresolved standard library headers. In this case, you need to refresh the project files from Unreal Editor in order to update the paths to the C++ toolset hardcoded into .vcxproj files. We’ve added a corresponding warning:
C++ standard library headers cannot be resolved in an Unreal Engine source file. You might need to regenerate the project files.

We’ve also imposed more restrictive rules on the auto-importing of include directives in order to avoid suggesting undesirable items:

  • We won’t suggest including a private header to a public header of the same module.
  • We won’t suggest including headers from the private catalogs of other modules (even in multi-module game projects).
  • We won’t suggest including headers from unreferenced modules (if experimental support for the UE project model is enabled on the Code Editing | C++ | Unreal Engine page of the ReSharper options).

These restrictions apply to both the auto-import quick-fix and the completion list with import completion enabled.

If you are searching for a fast standalone IDE for Unreal Engine, check out the Early Preview of Rider for Unreal Engine. Its Unreal Engine support is based on that of ReSharper C++. The builds are free – simply register and start coding!

Find usages now works even faster thanks to several performance fixes. It also finds constructor usages from braced init lists in more cases, including return statements:
Constructor usages in braced init lists

We’ve gone further and updated Go to declaration to work on unresolved identifiers similarly to how it works for identifiers in comments and macro bodies. ReSharper C++ will find all symbols with the matching name and let you navigate to them:
Go to declaration on unresolved identifiers

You should now be able to use Go to declaration on any identifier in your code! Let us know if we are missing anything.

Good news for C++/CLI users: navigation features, such as Go to Base Symbols and Go to Derived Symbols, now work on imported CLR entities.

The following improvement was requested right in the comment section of this blog. You know we’re listening, so please don’t hesitate to share your feedback!

In files with many preprocessor directives, the structure of the file as displayed in the File Structure window can become quite confusing. We’ve updated File Structure to ignore preprocessor directives by default so you can navigate through the file easily. If you wish to see preprocessor directives in File Structure, you can bring them back using a toolbar action.
File Structure: hide preprocessor directives

Modernize your C++ code

We’ve added another inspection to modernize your code: now ReSharper C++ gives you a hint when an std::pair usage can be replaced by a C++17 structured binding declaration. Simply use this quick-fix:
Convert to structured binding

The full list of all the issues fixed in this EAP build can be found in our issue tracker. We look forward to your feedback!

DOWNLOAD RESHARPER C++ 2020.2 EAP

Your ReSharper C++ team
JetBrains
The Drive to Develop

image description