ReSharper C++ 2024.2

Released: Aug 15, 2024

2024.2 での更新項目

機能

C++23 Support

  • This release adds support for the multidimensional subscript operator. Using operator[] with several arguments lets you better support multidimensional containers and views.
  • ReSharper C++ now also understands the #elifdef and #elifndef C++23/C23 preprocessor directives that complement the existing #ifdef and #ifndef directives.
  • [[assume(<expr>)]] is a new attribute in C++23 that adds a portable way to provide additional information to the optimizer using an argument expression. ReSharper C++ now parses the argument and supports all the usual code intelligence features inside it.

Unreal Engine

  • ReSharper C++ now recognizes Unreal Engine struct traits. In the structs annotated by struct traits, ReSharper C++ checks that the required methods are present and generates them if they are missing.
  • A new inspection detects missing calls to base methods, particularly in the BeginDestroy and GetLifetimeReplicatedProps methods. The accompanying fix inserts the required Super call.
  • Another new inspection flags usages of IOnlineSubsystem::Get() and replaces them with Online::GetSubsystem(this->GetWorld()).

Type layout

  • Quick info tooltips now include information about type layout. Just hover over a class or a class field to check its size and alignment.
  • When you hover over a class field, you'll also see the offset of the field from the start of the object and the padding that is added after the field.

Rename improvements

  • When you rename a file, ReSharper C++ now provides a new option to rename the related files with the same name. For example, if you rename a header file, the .cpp file that includes the header will be renamed as well.
  • Another file renaming option lets you automatically rename the type inside the file to match the new file name.
  • When renaming a namespace in a file with a matching name, you now have an option to automatically rename the containing file.

Code analysis

  • The bundled clang-tidy binary has been upgraded to Clang 18, bringing new checks and improvements from the latest LLVM release.
  • Similar to the support for NOLINT comments in the 2024.1 update, ReSharper C++ now recognizes include-what-you-use pragmas to suppress the Possible unused #include directive inspection.
  • Added a fix to use reinterpret_cast on conversion errors where either the source or the target type is a pointer to char or std::byte.

Miscellaneous

  • The 'Why is ReSharper suggesting this?' option in the inspection menu now links to the C++ Core Guidelines related to the code inspection.
  • The Base method call filter is now available in the Find Results window to let you filter out calls to base methods from the usages list.
  • ReSharper C++ now features asynchronous typing, which is a part of the ongoing effort to improve ReSharper's performance by enabling it to run out of process with Visual Studio.
  • ReSharper C++ also improves compatibility with CMake projects in Visual Studio, fixing several important issues and improving performance when editing code.