ReSharper C++ 2019.1

性能改進可加快索引速度並減少記憶體使用。
5月 2, 2019
新版本

特性

Performance improvements

  • ReSharper C++ 2019.1 introduces many performance improvements to speed up indexing and reduce memory usage.

Unreal Engine support

  • Unreal Engine naming convention - ReSharper C++ 2019.1 accommodates Unreal Engine naming convention across all its actions, including Introduce Variable and Rename refactorings, code generation for getters and setters, and many others. ReSharper C++ also keeps an eye on the names you use across your code base. It highlights any inconsistencies with the UE4 naming convention by running Inconsistent UE4 naming inspections. Apply the corresponding quick-fix to trigger a full Rename refactoring for such a symbol.
  • Completion for reflection specifiers - To help you easily work with Unreal Engine reflection macros, ReSharper C++ offers completion for reflection specifiers inside reflection macros.
  • Working with Remote Procedure Calls - ReSharper C++ 2019.1 will identify RPCs by Client, Server, or NetMulticast keywords in the UFUNCTION declaration statement. For such functions, ReSharper C++ is aware that an _Implementation function should be generated, as well as a _Validate function if WithValidation is set. It can generate both if both are missing, or only one if only one is missing. When navigating to a definition, both functions (_Validate and _Implementation) will be suggested. Alternatively, these options are available in the Alt+Enter menu too, as “Related UE4 functions”. Learn more.
  • Auto-import respects the generated headers - When you use a symbol that’s not available in the current scope, ReSharper C++ highlights it in red and suggests adding the missing #include when possible. When the #include is missing from a header file, it will be inserted before the .generated.h, which should be the last one in the list of includes. The incorrectly placed #include is highlighted by the corresponding inspection. In addition, auto-import no longer suggests symbols from Private and Classes folders of your UE4 project.

C++ language: C++17 and C++20

  • C++ understanding is enhanced further:
    • From C++17, added support for hexadecimal floating-point literals.
    • From C++20, basic support for Contracts and a three-way comparison operator was added, which includes accurate parsing and some partial resolve to get rid of obvious false-positives in the code.
    • C++20’s familiar template syntax for generic lambdas was added.
    • Alternative (text form) representation of operators is now supported.
  • K&R style C declarations - ReSharper C++ can now correctly handle C declarations in the K&R style. So if you have a legacy library using this kind of style or just prefer it for some reason, ReSharper C++ will now be able to work with it nicely.
  • Clang-Tidy - For a while now, ReSharper has provided seamless integration with Clang-Tidy, a powerful open-source code analysis tool based on the Clang compiler. In v2019.1, upgraded the built-in Clang-Tidy binary to Clang 8, to give you many new code checks and the accompanying fixes. Clang-Tidy options are now grouped on a separate options page under Options | Code Editing | C++ | Clang-Tidy. You can list the checks you wish to enable/disable using a simple text form there, provide a Clang-Tidy config, and even provide a custom Clang-Tidy binary that will be used instead of the bundled one.

Navigation

  • To make the editor as responsive as possible, this release speeds up Search everywhere and Go to type. Go to file member, Go to base class, and Go to derived class searches are now available during indexing. The performance of Go to Everything was also improved in several ways, including overall performance, search for patterns with :: or spaces, and other areas. When calling Go to File Member, you can now include base members in the list and navigate to them as well.

Naming Convention

  • Reworked the C++ Naming Convention settings page (ReSharper Options | Code Editing | C++ | Naming Style). Now you have two separate lists, specifiers and entity kinds (organized in a tree), and you can combine them and add rules specific to one or several kinds of entities. Several new entity kinds were introduced to make the configuration even more flexible:
    • Template parameters were split into type and non-type template parameters.
    • Parameters were split into function and lambda parameters.
    • Enumerators were split into scoped and unscoped enumerators.

Formatter

  • The formatter settings include many new options and enhancements:
    • To make the formatter more flexible, it's separated the formatting options for spaces around references and pointers. There are now two sets of options for each case, so, for example, you can add a space before a reference in the return type of a function, but skip it before the pointer.
    • You can wrap before the commas of a base class list.
    • Lots of new ClangFormat options are supported in ReSharper C++, such as CompactNamespaces, AllowShortBlocksOnASingleLine and AllowShortFunctionsOnASingleLine, AccessModifierOffset, BreakBeforeBraces: Custom, and many others.
    • In settings you can see now which formatting options are affected by a given ClangFormat options.

Documentation

  • When you are typing a documentation comment in your code, a typing assist will automatically insert /// on a new line when you press Enter. If there is an XML documentation comment for a function and its parameter is being renamed via the Rename refactoring, then the corresponding param tag in the documentation comment will also be updated. That is not all: if you rename the parameter manually, ReSharper C++ will highlight the mismatch for you and will suggest adding a new param tag or renaming the existing one.

Unit testing

  • In unit testing, the following are now supported:
    • TEMPLATE_PRODUCT_TEST_CASE test declarations from Catch 2.7, and
    • The GTEST_SKIP() macro from Google Test.
  • Additionally, increased the number of supported frameworks (previously covered Google Test, Boost.Test, and Catch) and added support for doctest. This is a relatively new framework which is lightweight and very flexible. It allows tests to be written directly in the production code and at the same time offers a way to remove everything test-related from the binary.
C++ language: C++17 and C++20

ReSharper C++

用於 C++ 開發的 Visual Studio 擴展。

有任何疑問嗎?

Live Chat現在與我們的JetBrains 專家即時聊天詢問。