ReSharper C++ 2020.3 EAP: Navigation for Preprocessor Directives, Updates to HLSL Support, and More
The latest ReSharper C++ EAP build includes import completion for incomplete classes, important updates to HLSL support, and allows you to navigate between preprocessor directives. Also, as always, there is something new for Unreal Engine. Read on for the details:
Navigation: jump between
#undefof the same macro or parts of a conditional preprocessing block.
- HLSL: control-flow analysis.
Unreal Engine: static and const for
BlueprintCallable, reminders to regenerate project files.
- Import completion for incomplete classes.
Download the new build from our website or via the Toolbox App.
Go to Declaration can now be used to quickly jump between matching preprocessor directives. You can navigate between
#undef of the same macro inside a single file:
You can also navigate between the directives that form a single conditional preprocessing block:
We introduced initial HLSL support back in 2020.1. We have been working on it ever since to address more language-specific cases and make the experience with it similar to what you’re used to with C++. In this EAP build, we’ve brought the full power of ReSharper’s control-flow analysis to HLSL.
The control-flow analysis is a powerful code analysis technique that tracks the possible execution paths through the body of any given function. Now all the usual ReSharper C++ inspections that use the control-flow analysis results are available for HLSL: warnings about unreachable code, uninitialized variables, redundant control flow jumps and conditional branches, and so on.
To get it to work for HLSL, we’ve also added support for HLSL-specific input modifiers that identify a function argument as an input, an output, or both. For example, now you’ll be warned when an out parameter has nothing assigned to it:
Have you ever seen hints that your
BlueprintCallable method can be made static or const and been bothered by how it would affect your blueprint nodes? We’ve tweaked these inspections, so now you can configure the severity for the
BlueprintCallable methods separately.
We’ve added more warnings for when you need to regenerate the project files. Now ReSharper C++ will warn you when the Unreal Engine version file cannot be found, or when the engine version you use does not match the version referenced in your game project.
Import completion for incomplete classes
With import completion enabled, the completion list will also include suitable elements from the header files that are not included into the current file. When an import completion item is selected, ReSharper C++ will automatically insert an import directive to include the required header file.
Unfortunately, in previous versions of ReSharper C++, the import completion would not help with one common case – completion of a member inside a class that has been forward-declared but not defined in the current translation unit. In this update, we’ve improved import completion so that members of incomplete classes are suggested as well:
You can enable import completion using the Show import items in basic completion setting in Code Editing | C++ | Code Completion.
That’s all for today! Keep trying out the new features, and don’t miss the changes coming in next week’s EAP.
Your ReSharper C++ team
The Drive to Develop
Subscribe to Blog updates
ReSharper C++ 2023.3 EAP: HLSL Updates and Completion in Inactive Code
The new EAP build is here with updates for HLSL support, code completion inside inactive preprocessor branches, and a new inlay hint for forwarding references.
ReSharper C++ 2023.3 EAP: Clang 17, Updated Attributes
The new EAP build is here with the upgraded bundled clang-format and clang-tidy binaries, a new action to generate a destructor, support for various clang intrinsics, and other updates.
The ReSharper C++ 2023.3 EAP Is Now Open
Our 2023.3 Early Access Program is now open! Read our first EAP digest to discover the latest enhancements to ReSharper C++.